cnhkmcp 1.3.6__py3-none-any.whl → 1.3.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. cnhkmcp/__init__.py +1 -1
  2. cnhkmcp/untracked/APP/.gitignore +32 -0
  3. cnhkmcp/untracked/APP/MODULAR_STRUCTURE.md +123 -0
  4. cnhkmcp/untracked/APP/README.md +309 -0
  5. cnhkmcp/untracked/APP/__pycache__/app.cpython-313.pyc +0 -0
  6. cnhkmcp/untracked/APP/blueprints/__init__.py +5 -0
  7. cnhkmcp/untracked/APP/blueprints/__pycache__/__init__.cpython-313.pyc +0 -0
  8. cnhkmcp/untracked/APP/blueprints/__pycache__/feature_engineering.cpython-313.pyc +0 -0
  9. cnhkmcp/untracked/APP/blueprints/__pycache__/idea_house.cpython-313.pyc +0 -0
  10. cnhkmcp/untracked/APP/blueprints/__pycache__/inspiration_house.cpython-313.pyc +0 -0
  11. cnhkmcp/untracked/APP/blueprints/__pycache__/paper_analysis.cpython-313.pyc +0 -0
  12. cnhkmcp/untracked/APP/blueprints/__pycache__/simulator.cpython-313.pyc +0 -0
  13. cnhkmcp/untracked/APP/blueprints/__pycache__/unified_tools.cpython-313.pyc +0 -0
  14. cnhkmcp/untracked/APP/blueprints/__pycache__/wqb_simulator.cpython-313.pyc +0 -0
  15. cnhkmcp/untracked/APP/blueprints/feature_engineering.py +347 -0
  16. cnhkmcp/untracked/APP/blueprints/idea_house.py +221 -0
  17. cnhkmcp/untracked/APP/blueprints/inspiration_house.py +432 -0
  18. cnhkmcp/untracked/APP/blueprints/paper_analysis.py +570 -0
  19. cnhkmcp/untracked/APP/custom_templates/templates.json +4582 -0
  20. cnhkmcp/untracked/APP/hkSimulator/ace_lib.py +1476 -0
  21. cnhkmcp/untracked/APP/hkSimulator/autosimulator.py +346 -0
  22. cnhkmcp/untracked/APP/hkSimulator/helpful_functions.py +180 -0
  23. cnhkmcp/untracked/APP/mirror_config.txt +20 -0
  24. cnhkmcp/untracked/APP/operaters.csv +129 -0
  25. cnhkmcp/untracked/APP/requirements.txt +44 -0
  26. cnhkmcp/untracked/APP/run_app.bat +28 -0
  27. cnhkmcp/untracked/APP/run_app.sh +34 -0
  28. cnhkmcp/untracked/APP/setup_tsinghua.bat +39 -0
  29. cnhkmcp/untracked/APP/setup_tsinghua.sh +43 -0
  30. cnhkmcp/untracked/APP/simulator/__pycache__/simulator_wqb.cpython-313.pyc +0 -0
  31. cnhkmcp/untracked/APP/simulator/alpha_submitter.py +366 -0
  32. cnhkmcp/untracked/APP/simulator/simulator_wqb.py +602 -0
  33. cnhkmcp/untracked/APP/ssrn-3332513.pdf +109188 -19
  34. cnhkmcp/untracked/APP/static/brain.js +478 -0
  35. cnhkmcp/untracked/APP/static/decoder.js +1275 -0
  36. cnhkmcp/untracked/APP/static/feature_engineering.js +1729 -0
  37. cnhkmcp/untracked/APP/static/idea_house.js +937 -0
  38. cnhkmcp/untracked/APP/static/inspiration_house.js +868 -0
  39. cnhkmcp/untracked/APP/static/paper_analysis.js +390 -0
  40. cnhkmcp/untracked/APP/static/script.js +2577 -0
  41. cnhkmcp/untracked/APP/static/simulator.js +597 -0
  42. cnhkmcp/untracked/APP/static/styles.css +3099 -0
  43. cnhkmcp/untracked/APP/templates/feature_engineering.html +959 -0
  44. cnhkmcp/untracked/APP/templates/idea_house.html +563 -0
  45. cnhkmcp/untracked/APP/templates/index.html +769 -0
  46. cnhkmcp/untracked/APP/templates/inspiration_house.html +860 -0
  47. cnhkmcp/untracked/APP/templates/paper_analysis.html +90 -0
  48. cnhkmcp/untracked/APP/templates/simulator.html +342 -0
  49. cnhkmcp/untracked/APP//321/210/342/224/220/320/240/321/210/320/261/320/234/321/206/320/231/320/243/321/205/342/225/235/320/220/321/206/320/230/320/241.py +1489 -0
  50. {cnhkmcp-1.3.6.dist-info → cnhkmcp-1.3.7.dist-info}/METADATA +1 -1
  51. cnhkmcp-1.3.7.dist-info/RECORD +67 -0
  52. cnhkmcp/untracked/APP.zip +0 -0
  53. cnhkmcp-1.3.6.dist-info/RECORD +0 -20
  54. {cnhkmcp-1.3.6.dist-info → cnhkmcp-1.3.7.dist-info}/WHEEL +0 -0
  55. {cnhkmcp-1.3.6.dist-info → cnhkmcp-1.3.7.dist-info}/entry_points.txt +0 -0
  56. {cnhkmcp-1.3.6.dist-info → cnhkmcp-1.3.7.dist-info}/licenses/LICENSE +0 -0
  57. {cnhkmcp-1.3.6.dist-info → cnhkmcp-1.3.7.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,563 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Idea House - Data Field Analysis</title>
7
+ <link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
8
+ <style>
9
+ .idea-house-container {
10
+ max-width: 1200px;
11
+ margin: 0 auto;
12
+ padding: 20px;
13
+ }
14
+
15
+ .data-fields-section {
16
+ background: rgba(255, 255, 255, 0.9);
17
+ border-radius: 8px;
18
+ padding: 20px;
19
+ margin-bottom: 20px;
20
+ box-shadow: 0 2px 4px rgba(0,0,0,0.1);
21
+ }
22
+
23
+ .api-config-section {
24
+ background: rgba(240, 242, 255, 0.9);
25
+ border-radius: 8px;
26
+ padding: 20px;
27
+ margin-bottom: 20px;
28
+ box-shadow: 0 2px 4px rgba(0,0,0,0.1);
29
+ border: 1px solid rgba(102, 126, 234, 0.2);
30
+ }
31
+
32
+ .data-fields-table {
33
+ width: 100%;
34
+ border-collapse: collapse;
35
+ margin-top: 20px;
36
+ }
37
+
38
+ .data-fields-table th,
39
+ .data-fields-table td {
40
+ padding: 12px;
41
+ text-align: left;
42
+ border-bottom: 1px solid #ddd;
43
+ }
44
+
45
+ .data-fields-table th {
46
+ background-color: #f5f5f5;
47
+ font-weight: bold;
48
+ position: sticky;
49
+ top: 0;
50
+ z-index: 10;
51
+ }
52
+
53
+ .data-fields-table tr:hover {
54
+ background-color: #f0f0f0;
55
+ cursor: pointer;
56
+ }
57
+
58
+ .data-fields-table tr.selected {
59
+ background-color: #e3f2fd;
60
+ }
61
+
62
+ .field-checkbox {
63
+ width: 20px;
64
+ height: 20px;
65
+ cursor: pointer;
66
+ }
67
+
68
+ .selected-fields-section {
69
+ background: rgba(255, 255, 255, 0.9);
70
+ border-radius: 8px;
71
+ padding: 20px;
72
+ margin-bottom: 20px;
73
+ box-shadow: 0 2px 4px rgba(0,0,0,0.1);
74
+ }
75
+
76
+ .selected-field-item {
77
+ display: inline-block;
78
+ background: #e3f2fd;
79
+ padding: 5px 10px;
80
+ margin: 5px;
81
+ border-radius: 4px;
82
+ font-size: 14px;
83
+ }
84
+
85
+ .results-section {
86
+ background: rgba(255, 255, 255, 0.9);
87
+ border-radius: 8px;
88
+ padding: 20px;
89
+ box-shadow: 0 2px 4px rgba(0,0,0,0.1);
90
+ }
91
+
92
+ .markdown-content {
93
+ padding: 20px;
94
+ background: #f9f9f9;
95
+ border-radius: 4px;
96
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
97
+ line-height: 1.6;
98
+ overflow-x: auto;
99
+ }
100
+
101
+ .markdown-content h1 {
102
+ color: #333;
103
+ border-bottom: 2px solid #4caf50;
104
+ padding-bottom: 10px;
105
+ margin-bottom: 20px;
106
+ }
107
+
108
+ .markdown-content h2 {
109
+ color: #555;
110
+ margin-top: 25px;
111
+ margin-bottom: 15px;
112
+ }
113
+
114
+ .markdown-content h3 {
115
+ color: #666;
116
+ margin-top: 20px;
117
+ margin-bottom: 10px;
118
+ }
119
+
120
+ .markdown-content ul {
121
+ margin: 10px 0;
122
+ padding-left: 20px;
123
+ }
124
+
125
+ .markdown-content li {
126
+ margin: 5px 0;
127
+ }
128
+
129
+ .markdown-content pre {
130
+ background: #f0f0f0;
131
+ padding: 15px;
132
+ border-radius: 4px;
133
+ overflow-x: auto;
134
+ font-family: 'Courier New', monospace;
135
+ }
136
+
137
+ .markdown-content code {
138
+ background: #f0f0f0;
139
+ padding: 2px 6px;
140
+ border-radius: 3px;
141
+ font-family: 'Courier New', monospace;
142
+ }
143
+
144
+ .markdown-content strong {
145
+ color: #333;
146
+ font-weight: bold;
147
+ }
148
+
149
+ .loading-overlay {
150
+ position: fixed;
151
+ top: 0;
152
+ left: 0;
153
+ width: 100%;
154
+ height: 100%;
155
+ background: rgba(0, 0, 0, 0.5);
156
+ display: none;
157
+ justify-content: center;
158
+ align-items: center;
159
+ z-index: 1000;
160
+ }
161
+
162
+ .loading-content {
163
+ background: white;
164
+ padding: 30px;
165
+ border-radius: 8px;
166
+ text-align: center;
167
+ }
168
+
169
+ .params-section {
170
+ margin: 20px 0;
171
+ padding: 15px;
172
+ background: #f5f5f5;
173
+ border-radius: 4px;
174
+ }
175
+
176
+ .params-row {
177
+ display: flex;
178
+ gap: 15px;
179
+ margin-bottom: 15px;
180
+ flex-wrap: wrap;
181
+ }
182
+
183
+ .param-group {
184
+ flex: 1;
185
+ min-width: 200px;
186
+ }
187
+
188
+ .param-group label {
189
+ display: block;
190
+ margin-bottom: 5px;
191
+ font-weight: bold;
192
+ }
193
+
194
+ .stats-info {
195
+ margin: 10px 0;
196
+ color: #666;
197
+ }
198
+
199
+ .table-container {
200
+ max-height: 500px;
201
+ overflow-y: auto;
202
+ border: 1px solid #ddd;
203
+ border-radius: 4px;
204
+ }
205
+
206
+ .toggle-btn {
207
+ background: #f0f0f0;
208
+ border: 1px solid #ddd;
209
+ color: #333;
210
+ cursor: pointer;
211
+ transition: all 0.3s ease;
212
+ }
213
+
214
+ .toggle-btn:hover {
215
+ background: #e0e0e0;
216
+ border-color: #999;
217
+ }
218
+
219
+ /* Data Fields Filter Styles */
220
+ .data-fields-controls {
221
+ display: flex;
222
+ align-items: center;
223
+ gap: 20px;
224
+ padding: 15px;
225
+ background: #f8f9fa;
226
+ border-bottom: 1px solid #dee2e6;
227
+ border-radius: 4px 4px 0 0;
228
+ flex-wrap: wrap;
229
+ }
230
+
231
+ .filter-label {
232
+ font-weight: 600;
233
+ color: #495057;
234
+ }
235
+
236
+ .filter-options {
237
+ display: flex;
238
+ gap: 15px;
239
+ flex-wrap: wrap;
240
+ }
241
+
242
+ .filter-options label {
243
+ display: flex;
244
+ align-items: center;
245
+ gap: 5px;
246
+ cursor: pointer;
247
+ font-size: 14px;
248
+ }
249
+
250
+ .filter-actions {
251
+ display: flex;
252
+ gap: 10px;
253
+ margin-left: auto;
254
+ }
255
+
256
+ .data-fields-stats {
257
+ padding: 10px 15px;
258
+ background: #f8f9fa;
259
+ border-bottom: 1px solid #dee2e6;
260
+ font-size: 14px;
261
+ color: #6c757d;
262
+ }
263
+
264
+ .data-fields-table {
265
+ width: 100%;
266
+ border-collapse: collapse;
267
+ font-size: 14px;
268
+ }
269
+
270
+ .data-fields-table th,
271
+ .data-fields-table td {
272
+ padding: 8px 12px;
273
+ text-align: left;
274
+ border-bottom: 1px solid #dee2e6;
275
+ }
276
+
277
+ .data-fields-table th {
278
+ background: #f8f9fa;
279
+ font-weight: 600;
280
+ color: #495057;
281
+ position: sticky;
282
+ top: 0;
283
+ z-index: 10;
284
+ }
285
+
286
+ .header-row th {
287
+ position: relative;
288
+ }
289
+
290
+ .sort-btn {
291
+ background: none;
292
+ border: none;
293
+ cursor: pointer;
294
+ margin-left: 5px;
295
+ padding: 2px 4px;
296
+ font-size: 12px;
297
+ color: #6c757d;
298
+ border-radius: 2px;
299
+ }
300
+
301
+ .sort-btn:hover {
302
+ background: #dee2e6;
303
+ color: #495057;
304
+ }
305
+
306
+ .sort-btn.asc {
307
+ color: #28a745;
308
+ }
309
+
310
+ .sort-btn.desc {
311
+ color: #dc3545;
312
+ }
313
+
314
+ .filter-row th {
315
+ padding: 5px 8px;
316
+ background: #ffffff;
317
+ }
318
+
319
+ .column-filter,
320
+ .column-filter-min,
321
+ .column-filter-max {
322
+ width: 100%;
323
+ padding: 4px 6px;
324
+ border: 1px solid #ced4da;
325
+ border-radius: 3px;
326
+ font-size: 12px;
327
+ }
328
+
329
+ .column-filter.active,
330
+ .column-filter-min.active,
331
+ .column-filter-max.active {
332
+ border-color: #4caf50;
333
+ background-color: #f0f8f0;
334
+ }
335
+
336
+ .range-filter {
337
+ display: flex;
338
+ align-items: center;
339
+ gap: 3px;
340
+ }
341
+
342
+ .range-filter input {
343
+ flex: 1;
344
+ min-width: 0;
345
+ }
346
+
347
+ .range-filter span {
348
+ font-size: 12px;
349
+ color: #6c757d;
350
+ }
351
+
352
+ .data-fields-table tbody tr {
353
+ cursor: pointer;
354
+ transition: background-color 0.2s;
355
+ }
356
+
357
+ .data-fields-table tbody tr:hover {
358
+ background-color: #f8f9fa;
359
+ }
360
+
361
+ .data-fields-table tbody tr.selected {
362
+ background-color: #e8f5e8;
363
+ border-left: 3px solid #4caf50;
364
+ }
365
+
366
+ .field-checkbox {
367
+ cursor: pointer;
368
+ }
369
+
370
+ .btn-small {
371
+ padding: 5px 10px;
372
+ font-size: 12px;
373
+ border-radius: 3px;
374
+ }
375
+ </style>
376
+ </head>
377
+ <body>
378
+ <div class="container">
379
+ <header>
380
+ <h1>Idea House</h1>
381
+ <p class="subtitle">Let Data Speak Out Loud</p>
382
+ <a href="/" class="btn btn-outline">← Back to Main</a>
383
+ </header>
384
+
385
+ <div class="idea-house-container">
386
+ <!-- Coze API Configuration Section -->
387
+ <div class="api-config-section">
388
+ <h2>Coze API Configuration</h2>
389
+ <div class="params-section">
390
+ <div class="params-row">
391
+ <div class="param-group" style="flex: 2;">
392
+ <label for="cozeApiTokenInput">
393
+ Coze API Token:
394
+ <button type="button" id="toggleApiTokenBtn" class="toggle-btn" style="margin-left: 10px; padding: 2px 8px; font-size: 12px;">Show</button>
395
+ </label>
396
+ <input type="password" id="cozeApiTokenInput" class="form-input" placeholder="Enter your Coze API token" value="sat_xZzjQThWADuE8uePBzh9fI0EN3Qt43OEEJ2pKbZm8SePbjnM7TDVardfmaWOI4JM">
397
+ </div>
398
+ <div class="param-group">
399
+ <label for="workflowIdInput">Workflow ID:</label>
400
+ <input type="text" id="workflowIdInput" class="form-input" placeholder="Enter workflow ID" value="7522912027267956786">
401
+ </div>
402
+ </div>
403
+ <div class="info-message" style="margin-top: 10px; font-size: 14px; color: #666;">
404
+ <em>Default values are provided. You can replace them with your own Coze API credentials.</em>
405
+ </div>
406
+ <div style="margin-top: 15px;">
407
+ <button id="saveCozeConfigBtn" class="btn btn-secondary btn-small">Save Configuration</button>
408
+ <button id="clearCozeConfigBtn" class="btn btn-outline btn-small" style="margin-left: 10px;">Reset to Default</button>
409
+ <span id="saveConfigMessage" style="margin-left: 10px; color: #4caf50; display: none;">Configuration saved!</span>
410
+ </div>
411
+ </div>
412
+ </div>
413
+
414
+ <!-- Data Fields Loading Section -->
415
+ <div class="data-fields-section">
416
+ <h2>Load Data Fields from BRAIN</h2>
417
+ <div class="params-section">
418
+ <div class="params-row">
419
+ <div class="param-group">
420
+ <label for="regionInput">Region:</label>
421
+ <input type="text" id="regionInput" class="form-input" value="USA">
422
+ </div>
423
+ <div class="param-group">
424
+ <label for="delayInput">Delay:</label>
425
+ <input type="number" id="delayInput" class="form-input" value="1">
426
+ </div>
427
+ <div class="param-group">
428
+ <label for="universeInput">Universe:</label>
429
+ <input type="text" id="universeInput" class="form-input" value="TOP3000">
430
+ </div>
431
+ <div class="param-group">
432
+ <label for="datasetInput">Dataset ID:</label>
433
+ <input type="text" id="datasetInput" class="form-input" value="analyst10">
434
+ </div>
435
+ </div>
436
+ <button id="loadDataFieldsBtn" class="btn btn-primary">Load Data Fields</button>
437
+ </div>
438
+
439
+ <div id="dataFieldsStats" class="stats-info"></div>
440
+
441
+ <div class="table-container" id="tableContainer" style="display: none;">
442
+ <!-- Add filtering controls -->
443
+ <div class="data-fields-controls">
444
+ <div class="filter-label">
445
+ <span>Quick Filters 👉</span>
446
+ </div>
447
+ <div class="filter-options">
448
+ <label>
449
+ <input type="checkbox" id="filterHighCoverage"> High Coverage (>90%)
450
+ </label>
451
+ <label>
452
+ <input type="checkbox" id="filterPopular"> Popular (>1000 users)
453
+ </label>
454
+ <label>
455
+ <input type="checkbox" id="filterMatrixOnly"> Matrix Type Only
456
+ </label>
457
+ </div>
458
+ <div class="filter-actions">
459
+ <button id="selectAllFiltered" class="btn btn-small btn-secondary">Select All Filtered</button>
460
+ <button id="clearAllSelected" class="btn btn-small btn-outline">Clear All</button>
461
+ </div>
462
+ </div>
463
+ <div class="data-fields-stats">
464
+ <span id="dataFieldsCount">0 fields loaded</span> |
465
+ <span id="filteredCount">0 filtered</span> |
466
+ <span id="selectedFieldsCount">0 selected</span>
467
+ </div>
468
+
469
+ <table class="data-fields-table" id="dataFieldsTable">
470
+ <thead>
471
+ <tr class="header-row">
472
+ <th style="width: 40px;">
473
+ <input type="checkbox" id="selectAllCheckbox" title="Select/Deselect All">
474
+ </th>
475
+ <th style="width: 200px; min-width: 150px;">
476
+ Field ID
477
+ <button class="sort-btn" data-column="id" data-order="asc">↕</button>
478
+ </th>
479
+ <th style="min-width: 300px;">
480
+ Description
481
+ <button class="sort-btn" data-column="description" data-order="asc">↕</button>
482
+ </th>
483
+ <th style="width: 100px;">
484
+ Type
485
+ <button class="sort-btn" data-column="type" data-order="asc">↕</button>
486
+ </th>
487
+ <th style="width: 150px;">
488
+ Coverage
489
+ <button class="sort-btn" data-column="coverage" data-order="asc">↕</button>
490
+ </th>
491
+ <th style="width: 100px;">
492
+ Users
493
+ <button class="sort-btn" data-column="userCount" data-order="asc">↕</button>
494
+ </th>
495
+ <th style="width: 100px;">
496
+ Alphas
497
+ <button class="sort-btn" data-column="alphaCount" data-order="asc">↕</button>
498
+ </th>
499
+ </tr>
500
+ <tr class="filter-row">
501
+ <th></th>
502
+ <th>
503
+ <input type="text" class="column-filter" data-column="id" placeholder="Filter ID...">
504
+ </th>
505
+ <th>
506
+ <input type="text" class="column-filter" data-column="description" placeholder="Filter description...">
507
+ </th>
508
+ <th>
509
+ <select class="column-filter" data-column="type" id="typeFilter">
510
+ <option value="">All Types</option>
511
+ </select>
512
+ </th>
513
+ <th>
514
+ <div class="range-filter">
515
+ <input type="number" class="column-filter-min" data-column="coverage" placeholder="Min %" min="0" max="100" step="0.1">
516
+ <span>-</span>
517
+ <input type="number" class="column-filter-max" data-column="coverage" placeholder="Max %" min="0" max="100" step="0.1">
518
+ </div>
519
+ </th>
520
+ <th>
521
+ <input type="number" class="column-filter" data-column="userCount" placeholder="Min users" min="0">
522
+ </th>
523
+ <th>
524
+ <input type="number" class="column-filter" data-column="alphaCount" placeholder="Min alphas" min="0">
525
+ </th>
526
+ </tr>
527
+ </thead>
528
+ <tbody id="dataFieldsTableBody">
529
+ <!-- Table rows will be populated here -->
530
+ </tbody>
531
+ </table>
532
+ </div>
533
+ </div>
534
+
535
+ <!-- Selected Fields Section -->
536
+ <div class="selected-fields-section" id="selectedFieldsSection" style="display: none;">
537
+ <h2>Selected Fields</h2>
538
+ <div id="selectedFieldsList"></div>
539
+ <button id="clearSelectionBtn" class="btn btn-secondary">Clear Selection</button>
540
+ <button id="processFieldsBtn" class="btn btn-primary">Process Selected Fields</button>
541
+ </div>
542
+
543
+ <!-- Results Section -->
544
+ <div class="results-section" id="resultsSection" style="display: none;">
545
+ <h2>Analysis Results</h2>
546
+ <div class="markdown-content" id="resultsContent">
547
+ <!-- Results will be displayed here -->
548
+ </div>
549
+ </div>
550
+ </div>
551
+ </div>
552
+
553
+ <!-- Loading Overlay -->
554
+ <div class="loading-overlay" id="loadingOverlay">
555
+ <div class="loading-content">
556
+ <h3>Processing...</h3>
557
+ <p>Please wait while we analyze your selected fields...</p>
558
+ </div>
559
+ </div>
560
+
561
+ <script src="{{ url_for('static', filename='idea_house.js') }}"></script>
562
+ </body>
563
+ </html>