py2ls 0.1.9.7__py3-none-any.whl → 0.1.9.9__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.
- py2ls/data/styles/style10.json +213 -0
- py2ls/data/styles/style11.json +213 -0
- py2ls/data/styles/style12.json +192 -0
- py2ls/ich2ls.py +136 -0
- py2ls/ips.py +394 -221
- py2ls/netfinder.py +39 -8
- py2ls/plot.py +216 -61
- py2ls/stats.py +1 -3
- {py2ls-0.1.9.7.dist-info → py2ls-0.1.9.9.dist-info}/METADATA +1 -1
- {py2ls-0.1.9.7.dist-info → py2ls-0.1.9.9.dist-info}/RECORD +11 -7
- {py2ls-0.1.9.7.dist-info → py2ls-0.1.9.9.dist-info}/WHEEL +0 -0
py2ls/netfinder.py
CHANGED
@@ -204,8 +204,8 @@ def get_proxy():
|
|
204
204
|
|
205
205
|
|
206
206
|
# proxies_glob=get_proxy()
|
207
|
-
def get_soup(url,
|
208
|
-
_, soup_ = fetch_all(url,
|
207
|
+
def get_soup(url, **kwargs):
|
208
|
+
_, soup_ = fetch_all(url, **kwargs)
|
209
209
|
return soup_
|
210
210
|
|
211
211
|
|
@@ -223,6 +223,8 @@ def fetch_all(
|
|
223
223
|
by=By.TAG_NAME,
|
224
224
|
timeout=10,
|
225
225
|
retry=2,
|
226
|
+
wait=0,
|
227
|
+
scroll_try=3,
|
226
228
|
login_url=None,
|
227
229
|
username=None,
|
228
230
|
password=None,
|
@@ -310,6 +312,17 @@ def fetch_all(
|
|
310
312
|
|
311
313
|
driver_ = webdriver.Chrome(service=service, options=chrome_options)
|
312
314
|
|
315
|
+
# 隐式等等待
|
316
|
+
if 3 < wait < 5:
|
317
|
+
wait_ = random.uniform(3, 5)
|
318
|
+
elif 5 <= wait < 8:
|
319
|
+
wait_ = random.uniform(5, 8)
|
320
|
+
elif 8 <= wait < 12:
|
321
|
+
wait_ = random.uniform(8, 10)
|
322
|
+
else:
|
323
|
+
wait_ = 0
|
324
|
+
driver_.implicitly_wait(wait_)
|
325
|
+
|
313
326
|
if login_url and login_dict:
|
314
327
|
cookies = get_cookies(url=login_url, login=login_dict)
|
315
328
|
driver_.get(url)
|
@@ -344,10 +357,20 @@ def fetch_all(
|
|
344
357
|
# WebDriverWait(driver, timeout).until(
|
345
358
|
# EC.presence_of_element_located((by, where))
|
346
359
|
# )
|
347
|
-
|
360
|
+
|
361
|
+
# 设置轮询
|
362
|
+
for attempt in range(scroll_try):
|
363
|
+
page_source = driver_.page_source
|
364
|
+
content = BeautifulSoup(page_source, "html.parser")
|
365
|
+
if content and content.find_all(by):
|
366
|
+
break
|
367
|
+
sleep(
|
368
|
+
random.uniform(2, 4)
|
369
|
+
) # Wait for a random time before polling again
|
370
|
+
|
348
371
|
driver_.quit()
|
349
372
|
|
350
|
-
content = BeautifulSoup(page_source, "html.parser")
|
373
|
+
# content = BeautifulSoup(page_source, "html.parser")
|
351
374
|
if content:
|
352
375
|
return "text/html", content
|
353
376
|
else:
|
@@ -641,13 +664,17 @@ def downloader(
|
|
641
664
|
else:
|
642
665
|
file_links = []
|
643
666
|
print("No files detected")
|
644
|
-
|
667
|
+
if isinstance(file_links, str):
|
668
|
+
file_links_all = [file_links]
|
669
|
+
elif isinstance(file_links, list):
|
670
|
+
file_links_all.extend(file_links)
|
645
671
|
if dir_save:
|
646
672
|
if rm_folder:
|
647
673
|
ips.rm_folder(dir_save)
|
648
674
|
if verbose:
|
649
675
|
print(f"\n... attempting to download to local\n")
|
650
676
|
fnames = [file_link.split("/")[-1] for file_link in file_links_all]
|
677
|
+
|
651
678
|
for idx, file_link in enumerate(file_links_all):
|
652
679
|
headers = {"User-Agent": user_agent()}
|
653
680
|
itry = 0 # Retry logic with exception handling
|
@@ -687,6 +714,7 @@ def downloader(
|
|
687
714
|
print(
|
688
715
|
f"Failed to download file: HTTP status code {response.status_code}"
|
689
716
|
)
|
717
|
+
break
|
690
718
|
except (ChunkedEncodingError, ConnectionError) as e:
|
691
719
|
print(f"Attempt {itry+1} failed: {e}. Retrying in a few seconds...")
|
692
720
|
# time.sleep(random.uniform(0, 2)) # Random sleep to mitigate server issues
|
@@ -697,13 +725,13 @@ def downloader(
|
|
697
725
|
if itry == n_try:
|
698
726
|
print(f"Failed to download {file_link} after {n_try} attempts.")
|
699
727
|
|
700
|
-
print(f"\n{len(fnames)} files were downloaded:")
|
728
|
+
# print(f"\n{len(fnames)} files were downloaded:")
|
701
729
|
if verbose:
|
702
730
|
if corrected_fname:
|
703
731
|
pp(corrected_fname)
|
732
|
+
print(f"\n\nsaved @:\n{dir_save}")
|
704
733
|
else:
|
705
734
|
pp(fnames)
|
706
|
-
print(f"\n\nsaved @:\n{dir_save}")
|
707
735
|
|
708
736
|
|
709
737
|
def find_img(url, driver="request", dir_save="images", rm_folder=False, verbose=True):
|
@@ -1317,6 +1345,7 @@ def search(
|
|
1317
1345
|
verbose=False,
|
1318
1346
|
download=False,
|
1319
1347
|
dir_save=dir_save,
|
1348
|
+
**kwargs,
|
1320
1349
|
):
|
1321
1350
|
|
1322
1351
|
if "te" in kind.lower():
|
@@ -1327,7 +1356,9 @@ def search(
|
|
1327
1356
|
print(f'searching "{query}": got the results below\n{res}')
|
1328
1357
|
if download:
|
1329
1358
|
try:
|
1330
|
-
downloader(
|
1359
|
+
downloader(
|
1360
|
+
url=res.links.tolist(), dir_save=dir_save, verbose=verbose, **kwargs
|
1361
|
+
)
|
1331
1362
|
except:
|
1332
1363
|
if verbose:
|
1333
1364
|
print(f"failed link")
|
py2ls/plot.py
CHANGED
@@ -349,7 +349,11 @@ def catplot(data, *args, **kwargs):
|
|
349
349
|
edgecolor=opt_v["EdgeColor"],
|
350
350
|
label=label[i],
|
351
351
|
lw=opt_v["LineWidth"],
|
352
|
-
hatch=
|
352
|
+
hatch=(
|
353
|
+
opt_v["hatch"][i % len(opt_v["FaceColor"])]
|
354
|
+
if opt_v["hatch"] is not None
|
355
|
+
else None
|
356
|
+
),
|
353
357
|
)
|
354
358
|
elif (
|
355
359
|
"l" in opt_v["loc"].lower()
|
@@ -364,7 +368,11 @@ def catplot(data, *args, **kwargs):
|
|
364
368
|
edgecolor=opt_v["EdgeColor"],
|
365
369
|
label=label[i],
|
366
370
|
lw=opt_v["LineWidth"],
|
367
|
-
hatch=
|
371
|
+
hatch=(
|
372
|
+
opt_v["hatch"][i % len(opt_v["FaceColor"])]
|
373
|
+
if opt_v["hatch"] is not None
|
374
|
+
else None
|
375
|
+
),
|
368
376
|
)
|
369
377
|
elif (
|
370
378
|
"o" in opt_v["loc"].lower()
|
@@ -379,7 +387,11 @@ def catplot(data, *args, **kwargs):
|
|
379
387
|
edgecolor=opt_v["EdgeColor"],
|
380
388
|
label=label[i],
|
381
389
|
lw=opt_v["LineWidth"],
|
382
|
-
hatch=
|
390
|
+
hatch=(
|
391
|
+
opt_v["hatch"][i % len(opt_v["FaceColor"])]
|
392
|
+
if opt_v["hatch"] is not None
|
393
|
+
else None
|
394
|
+
),
|
383
395
|
)
|
384
396
|
elif "i" in opt_v["loc"].lower():
|
385
397
|
if i % 2 == 1: # odd number
|
@@ -394,7 +406,11 @@ def catplot(data, *args, **kwargs):
|
|
394
406
|
edgecolor=opt_v["EdgeColor"],
|
395
407
|
label=label[i],
|
396
408
|
lw=opt_v["LineWidth"],
|
397
|
-
hatch=
|
409
|
+
hatch=(
|
410
|
+
opt_v["hatch"][i % len(opt_v["FaceColor"])]
|
411
|
+
if opt_v["hatch"] is not None
|
412
|
+
else None
|
413
|
+
),
|
398
414
|
)
|
399
415
|
else:
|
400
416
|
ax.fill_betweenx(
|
@@ -408,7 +424,11 @@ def catplot(data, *args, **kwargs):
|
|
408
424
|
edgecolor=opt_v["EdgeColor"],
|
409
425
|
label=label[i],
|
410
426
|
lw=opt_v["LineWidth"],
|
411
|
-
hatch=
|
427
|
+
hatch=(
|
428
|
+
opt_v["hatch"][i % len(opt_v["FaceColor"])]
|
429
|
+
if opt_v["hatch"] is not None
|
430
|
+
else None
|
431
|
+
),
|
412
432
|
)
|
413
433
|
elif "f" in opt_v["loc"].lower():
|
414
434
|
ax.fill_betweenx(
|
@@ -420,7 +440,11 @@ def catplot(data, *args, **kwargs):
|
|
420
440
|
edgecolor=opt_v["EdgeColor"],
|
421
441
|
label=label[i],
|
422
442
|
lw=opt_v["LineWidth"],
|
423
|
-
hatch=
|
443
|
+
hatch=(
|
444
|
+
opt_v["hatch"][i % len(opt_v["FaceColor"])]
|
445
|
+
if opt_v["hatch"] is not None
|
446
|
+
else None
|
447
|
+
),
|
424
448
|
)
|
425
449
|
else:
|
426
450
|
if "r" in opt_v["loc"].lower():
|
@@ -432,7 +456,11 @@ def catplot(data, *args, **kwargs):
|
|
432
456
|
alpha=opt_v["FaceAlpha"],
|
433
457
|
edgecolor=opt_v["EdgeColor"],
|
434
458
|
lw=opt_v["LineWidth"],
|
435
|
-
hatch=
|
459
|
+
hatch=(
|
460
|
+
opt_v["hatch"][i % len(opt_v["FaceColor"])]
|
461
|
+
if opt_v["hatch"] is not None
|
462
|
+
else None
|
463
|
+
),
|
436
464
|
)
|
437
465
|
elif (
|
438
466
|
"l" in opt_v["loc"].lower() and not "f" in opt_v["loc"].lower()
|
@@ -445,7 +473,11 @@ def catplot(data, *args, **kwargs):
|
|
445
473
|
alpha=opt_v["FaceAlpha"],
|
446
474
|
edgecolor=opt_v["EdgeColor"],
|
447
475
|
lw=opt_v["LineWidth"],
|
448
|
-
hatch=
|
476
|
+
hatch=(
|
477
|
+
opt_v["hatch"][i % len(opt_v["FaceColor"])]
|
478
|
+
if opt_v["hatch"] is not None
|
479
|
+
else None
|
480
|
+
),
|
449
481
|
)
|
450
482
|
elif "o" in opt_v["loc"].lower() or "both" in opt_v["loc"].lower():
|
451
483
|
ax.fill_betweenx(
|
@@ -456,7 +488,11 @@ def catplot(data, *args, **kwargs):
|
|
456
488
|
alpha=opt_v["FaceAlpha"],
|
457
489
|
edgecolor=opt_v["EdgeColor"],
|
458
490
|
lw=opt_v["LineWidth"],
|
459
|
-
hatch=
|
491
|
+
hatch=(
|
492
|
+
opt_v["hatch"][i % len(opt_v["FaceColor"])]
|
493
|
+
if opt_v["hatch"] is not None
|
494
|
+
else None
|
495
|
+
),
|
460
496
|
)
|
461
497
|
elif "i" in opt_v["loc"].lower():
|
462
498
|
if i % 2 == 1: # odd number
|
@@ -468,7 +504,11 @@ def catplot(data, *args, **kwargs):
|
|
468
504
|
alpha=opt_v["FaceAlpha"],
|
469
505
|
edgecolor=opt_v["EdgeColor"],
|
470
506
|
lw=opt_v["LineWidth"],
|
471
|
-
hatch=
|
507
|
+
hatch=(
|
508
|
+
opt_v["hatch"][i % len(opt_v["FaceColor"])]
|
509
|
+
if opt_v["hatch"] is not None
|
510
|
+
else None
|
511
|
+
),
|
472
512
|
)
|
473
513
|
else:
|
474
514
|
ax.fill_betweenx(
|
@@ -479,7 +519,11 @@ def catplot(data, *args, **kwargs):
|
|
479
519
|
alpha=opt_v["FaceAlpha"],
|
480
520
|
edgecolor=opt_v["EdgeColor"],
|
481
521
|
lw=opt_v["LineWidth"],
|
482
|
-
hatch=
|
522
|
+
hatch=(
|
523
|
+
opt_v["hatch"][i % len(opt_v["FaceColor"])]
|
524
|
+
if opt_v["hatch"] is not None
|
525
|
+
else None
|
526
|
+
),
|
483
527
|
)
|
484
528
|
elif "f" in opt_v["loc"].lower():
|
485
529
|
ax.fill_betweenx(
|
@@ -490,7 +534,11 @@ def catplot(data, *args, **kwargs):
|
|
490
534
|
alpha=opt_v["FaceAlpha"],
|
491
535
|
edgecolor=opt_v["EdgeColor"],
|
492
536
|
lw=opt_v["LineWidth"],
|
493
|
-
hatch=
|
537
|
+
hatch=(
|
538
|
+
opt_v["hatch"][i % len(opt_v["FaceColor"])]
|
539
|
+
if opt_v["hatch"] is not None
|
540
|
+
else None
|
541
|
+
),
|
494
542
|
)
|
495
543
|
|
496
544
|
def plot_ridgeplot(data, x, y, opt_r, **kwargs_figsets):
|
@@ -723,6 +771,7 @@ def catplot(data, *args, **kwargs):
|
|
723
771
|
col = kwargs.get("col", None)
|
724
772
|
report = kwargs.get("report", True)
|
725
773
|
vertical = kwargs.get("vertical", True)
|
774
|
+
stats_subgroup = kwargs.get("stats_subgroup", True)
|
726
775
|
if not col:
|
727
776
|
kw_figsets = kwargs.get("figsets", None)
|
728
777
|
# check the data type
|
@@ -755,23 +804,100 @@ def catplot(data, *args, **kwargs):
|
|
755
804
|
for i in df[x].unique().tolist():
|
756
805
|
print(i) # to indicate which 'x'
|
757
806
|
if hue and stats_param:
|
758
|
-
if
|
759
|
-
|
760
|
-
|
807
|
+
if stats_subgroup:
|
808
|
+
data_temp = df[df[x] == i]
|
809
|
+
hue_labels = data_temp[hue].unique().tolist()
|
810
|
+
if isinstance(stats_param, dict):
|
811
|
+
if len(hue_labels) > 2:
|
812
|
+
if "factor" in stats_param.keys():
|
813
|
+
res_tmp = FuncMultiCmpt(
|
814
|
+
data=data_temp, dv=y, **stats_param
|
815
|
+
)
|
816
|
+
else:
|
817
|
+
res_tmp = FuncMultiCmpt(
|
818
|
+
data=data_temp,
|
819
|
+
dv=y,
|
820
|
+
factor=hue,
|
821
|
+
**stats_param,
|
822
|
+
)
|
823
|
+
elif bool(stats_param):
|
824
|
+
res_tmp = FuncMultiCmpt(
|
825
|
+
data=data_temp, dv=y, factor=hue
|
826
|
+
)
|
827
|
+
else:
|
828
|
+
res_tmp = "did not work properly"
|
829
|
+
display_output(res_tmp)
|
830
|
+
res = pd.concat(
|
831
|
+
[res, pd.DataFrame([res_tmp])],
|
832
|
+
ignore_index=True,
|
833
|
+
axis=0,
|
834
|
+
)
|
761
835
|
else:
|
762
|
-
|
763
|
-
|
836
|
+
if isinstance(stats_param, dict):
|
837
|
+
pmc = stats_param.get("pmc", "pmc")
|
838
|
+
pair = stats_param.get("pair", "unpaired")
|
839
|
+
else:
|
840
|
+
pmc = "pmc"
|
841
|
+
pair = "unpair"
|
842
|
+
|
843
|
+
res_tmp = FuncCmpt(
|
844
|
+
x1=data_temp.loc[
|
845
|
+
data_temp[hue] == hue_labels[0], y
|
846
|
+
].tolist(),
|
847
|
+
x2=data_temp.loc[
|
848
|
+
data_temp[hue] == hue_labels[1], y
|
849
|
+
].tolist(),
|
850
|
+
pmc=pmc,
|
851
|
+
pair=pair,
|
764
852
|
)
|
765
|
-
|
766
|
-
res_tmp = FuncMultiCmpt(
|
767
|
-
data=df[df[x] == i], dv=y, factor=hue
|
768
|
-
)
|
853
|
+
display_output(res_tmp)
|
769
854
|
else:
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
855
|
+
if isinstance(stats_param, dict):
|
856
|
+
if len(xticklabels) > 2:
|
857
|
+
if "factor" in stats_param.keys():
|
858
|
+
res_tmp = FuncMultiCmpt(
|
859
|
+
data=df, dv=y, **stats_param
|
860
|
+
)
|
861
|
+
else:
|
862
|
+
res_tmp = FuncMultiCmpt(
|
863
|
+
data=df[df[x] == i],
|
864
|
+
dv=y,
|
865
|
+
factor=hue,
|
866
|
+
**stats_param,
|
867
|
+
)
|
868
|
+
elif bool(stats_param):
|
869
|
+
res_tmp = FuncMultiCmpt(
|
870
|
+
data=df[df[x] == i], dv=y, factor=hue
|
871
|
+
)
|
872
|
+
else:
|
873
|
+
res_tmp = "did not work properly"
|
874
|
+
display_output(res_tmp)
|
875
|
+
res = pd.concat(
|
876
|
+
[res, pd.DataFrame([res_tmp])],
|
877
|
+
ignore_index=True,
|
878
|
+
axis=0,
|
879
|
+
)
|
880
|
+
else:
|
881
|
+
if isinstance(stats_param, dict):
|
882
|
+
pmc = stats_param.get("pmc", "pmc")
|
883
|
+
pair = stats_param.get("pair", "unpaired")
|
884
|
+
else:
|
885
|
+
pmc = "pmc"
|
886
|
+
pair = "unpair"
|
887
|
+
|
888
|
+
data_temp = df[df[x] == i]
|
889
|
+
hue_labels = data_temp[hue].unique().tolist()
|
890
|
+
res_tmp = FuncCmpt(
|
891
|
+
x1=data_temp.loc[
|
892
|
+
data_temp[hue] == hue_labels[0], y
|
893
|
+
].tolist(),
|
894
|
+
x2=data_temp.loc[
|
895
|
+
data_temp[hue] == hue_labels[1], y
|
896
|
+
].tolist(),
|
897
|
+
pmc=pmc,
|
898
|
+
pair=pair,
|
899
|
+
)
|
900
|
+
display_output(res_tmp)
|
775
901
|
ihue += 1
|
776
902
|
|
777
903
|
else:
|
@@ -1115,41 +1241,70 @@ def catplot(data, *args, **kwargs):
|
|
1115
1241
|
res,
|
1116
1242
|
xticks_x_loc,
|
1117
1243
|
xticklabels,
|
1118
|
-
y_loc=np.
|
1244
|
+
y_loc=np.nanmax(data),
|
1119
1245
|
report_go=report,
|
1120
1246
|
)
|
1121
1247
|
else: # hue is not None
|
1122
1248
|
ihue = 1
|
1123
1249
|
for i in df[x].unique().tolist():
|
1250
|
+
data_temp = df[df[x] == i]
|
1251
|
+
hue_labels = data_temp[hue].unique().tolist()
|
1124
1252
|
if stats_param:
|
1125
|
-
if
|
1126
|
-
if
|
1253
|
+
if len(hue_labels) > 2:
|
1254
|
+
if isinstance(stats_param, dict):
|
1255
|
+
if "factor" in stats_param.keys():
|
1256
|
+
res_tmp = FuncMultiCmpt(
|
1257
|
+
data=df, dv=y, **stats_param
|
1258
|
+
)
|
1259
|
+
else:
|
1260
|
+
res_tmp = FuncMultiCmpt(
|
1261
|
+
data=df[df[x] == i],
|
1262
|
+
dv=y,
|
1263
|
+
factor=hue,
|
1264
|
+
**stats_param,
|
1265
|
+
)
|
1266
|
+
elif bool(stats_param):
|
1127
1267
|
res_tmp = FuncMultiCmpt(
|
1128
|
-
data=df, dv=y,
|
1268
|
+
data=df[df[x] == i], dv=y, factor=hue
|
1129
1269
|
)
|
1130
1270
|
else:
|
1131
|
-
res_tmp =
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
data
|
1271
|
+
res_tmp = "did not work properly"
|
1272
|
+
xloc_curr = hue_len * (ihue - 1)
|
1273
|
+
|
1274
|
+
add_asterisks(
|
1275
|
+
ax,
|
1276
|
+
res_tmp,
|
1277
|
+
xticks[xloc_curr : xloc_curr + hue_len],
|
1278
|
+
legend_hue,
|
1279
|
+
y_loc=np.nanmax(data),
|
1280
|
+
report_go=report,
|
1140
1281
|
)
|
1141
1282
|
else:
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1283
|
+
if isinstance(stats_param, dict):
|
1284
|
+
pmc = stats_param.get("pmc", "pmc")
|
1285
|
+
pair = stats_param.get("pair", "unpaired")
|
1286
|
+
else:
|
1287
|
+
pmc = "pmc"
|
1288
|
+
pair = "unpair"
|
1289
|
+
res_tmp = FuncCmpt(
|
1290
|
+
x1=data_temp.loc[
|
1291
|
+
data_temp[hue] == hue_labels[0], y
|
1292
|
+
].tolist(),
|
1293
|
+
x2=data_temp.loc[
|
1294
|
+
data_temp[hue] == hue_labels[1], y
|
1295
|
+
].tolist(),
|
1296
|
+
pmc=pmc,
|
1297
|
+
pair=pair,
|
1298
|
+
)
|
1299
|
+
xloc_curr = hue_len * (ihue - 1)
|
1300
|
+
add_asterisks(
|
1301
|
+
ax,
|
1302
|
+
res_tmp,
|
1303
|
+
xticks[xloc_curr : xloc_curr + hue_len],
|
1304
|
+
legend_hue,
|
1305
|
+
y_loc=np.nanmax(data),
|
1306
|
+
report_go=report,
|
1307
|
+
)
|
1153
1308
|
ihue += 1
|
1154
1309
|
else: # 240814: still has some bugs
|
1155
1310
|
if isinstance(res, dict):
|
@@ -2130,20 +2285,20 @@ def add_asterisks(ax, res, xticks_x_loc, xticklabels, **kwargs_funcstars):
|
|
2130
2285
|
pval_groups = res["pval"]
|
2131
2286
|
FuncStars(
|
2132
2287
|
ax=ax,
|
2133
|
-
x1=
|
2134
|
-
x2=
|
2135
|
-
pval=pval_groups,
|
2136
|
-
**kwargs_funcstars,
|
2137
|
-
)
|
2138
|
-
else:
|
2139
|
-
pval_groups = res["pval"]
|
2140
|
-
FuncStars(
|
2141
|
-
ax=ax,
|
2142
|
-
x1=1,
|
2143
|
-
x2=2,
|
2288
|
+
x1=xticks_x_loc[0],
|
2289
|
+
x2=xticks_x_loc[1],
|
2144
2290
|
pval=pval_groups,
|
2145
2291
|
**kwargs_funcstars,
|
2146
2292
|
)
|
2293
|
+
# else:
|
2294
|
+
# pval_groups = res["pval"]
|
2295
|
+
# FuncStars(
|
2296
|
+
# ax=ax,
|
2297
|
+
# x1=1,
|
2298
|
+
# x2=2,
|
2299
|
+
# pval=pval_groups,
|
2300
|
+
# **kwargs_funcstars,
|
2301
|
+
# )
|
2147
2302
|
|
2148
2303
|
|
2149
2304
|
def style_examples(
|
py2ls/stats.py
CHANGED
@@ -705,9 +705,7 @@ def extract_apa(res_tab):
|
|
705
705
|
for irow in range(res_tab.shape[0]):
|
706
706
|
note_tmp = f'{res_tab.Source[irow]}:F{round(res_tab.ddof1[irow]),round(res_tab.ddof2[irow])}={round(res_tab.F[irow],3)},p={round(res_tab["p-unc"][irow],3)}'
|
707
707
|
notes_APA.append(note_tmp)
|
708
|
-
elif "DF" in res_tab:
|
709
|
-
print("here")
|
710
|
-
display(res_tab)
|
708
|
+
elif "DF" in res_tab:
|
711
709
|
for irow in range(res_tab.shape[0] - 1):
|
712
710
|
note_tmp = f'{res_tab.Source[irow]}:F{round(res_tab.DF[irow]),round(res_tab.DF[res_tab.shape[0]-1])}={round(res_tab.F[irow],3)},p={round(res_tab["p-unc"][irow],3)}'
|
713
711
|
notes_APA.append(note_tmp)
|
@@ -161,6 +161,9 @@ py2ls/data/styles/example/style7.pdf,sha256=Sz54Qzvt6k6fCkvvZd6S4RSZjVZvxPxIx_uv
|
|
161
161
|
py2ls/data/styles/example/style8.pdf,sha256=8As6rsajoqQEU9hUy4YDHOsXYpD4PJcbWMz-4iV77gI,62296
|
162
162
|
py2ls/data/styles/example/style9.pdf,sha256=uT4_9bZaoBB7aXoobIY8-k_OX7TNxJ_Zwqvr7o9deO0,65828
|
163
163
|
py2ls/data/styles/style1.json,sha256=Q3tdH0Sf08FjNUZE5mELA45JEw3BXjSAL2nLfFDn1bU,3101
|
164
|
+
py2ls/data/styles/style10.json,sha256=NMKlzsvpQcfSAWRRRRPnU9QvP7AfggamYHFeihnicJo,4830
|
165
|
+
py2ls/data/styles/style11.json,sha256=08kqry14T40KriRiS2FQBHkL4v_b7cn8BecQt9JYi50,4830
|
166
|
+
py2ls/data/styles/style12.json,sha256=GwEb2k116q9uvFEgVn9PMFTeUM-GYR2PD6ZzABCOMJo,4311
|
164
167
|
py2ls/data/styles/style2.json,sha256=2xhDv-_qQOKaODy8fWRoaQk_W5-I3EdA6uh4JNnINGg,3124
|
165
168
|
py2ls/data/styles/style3.json,sha256=0lHmjFGqlf1c7HLllsgGVNFkuEsqSCicBv-iOTB9hRk,3126
|
166
169
|
py2ls/data/styles/style4.json,sha256=G8thPHwmJyS3kDletrh3NkapZ03bNfey2-zpG4erBfk,3072
|
@@ -173,14 +176,15 @@ py2ls/db2ls.py,sha256=MMfFX47aIPIyu7fU9aPvX9lbPRPYOpJ_VXwlnWk-8qo,13615
|
|
173
176
|
py2ls/doc.py,sha256=xN3g1OWfoaGUhikbJ0NqbN5eKy1VZVvWwRlhHMgyVEc,4243
|
174
177
|
py2ls/export_requirements.py,sha256=x2WgUF0jYKz9GfA1MVKN-MdsM-oQ8yUeC6Ua8oCymio,2325
|
175
178
|
py2ls/freqanalysis.py,sha256=F4218VSPbgL5tnngh6xNCYuNnfR-F_QjECUUxrPYZss,32594
|
176
|
-
py2ls/
|
177
|
-
py2ls/
|
178
|
-
py2ls/
|
179
|
+
py2ls/ich2ls.py,sha256=LYoMjU8fRJrtu_ZAnIAQkZVs2Vdoy7RvyUGA9Fq_Pt4,5995
|
180
|
+
py2ls/ips.py,sha256=HbktFzKIszBHtB3DtyUCCM6xj9NJZAz38ZCcIomjBFs,105439
|
181
|
+
py2ls/netfinder.py,sha256=oo8Nyqe9Oi3TON7YS9TCs2RBUjPY3KY7772DrsNPkyU,50679
|
182
|
+
py2ls/plot.py,sha256=pMopJJSapyUwAFaoizwJMGSawGFVQFcAPDOh1vFM7N4,94253
|
179
183
|
py2ls/setuptools-70.1.0-py3-none-any.whl,sha256=2bi3cUVal8ip86s0SOvgspteEF8SKLukECi-EWmFomc,882588
|
180
184
|
py2ls/sleep_events_detectors.py,sha256=bQA3HJqv5qnYKJJEIhCyhlDtkXQfIzqksnD0YRXso68,52145
|
181
|
-
py2ls/stats.py,sha256=
|
185
|
+
py2ls/stats.py,sha256=fJmXQ9Lq460StOn-kfEljE97cySq7876HUPTnpB5hLs,38123
|
182
186
|
py2ls/translator.py,sha256=bc5FB-wqC4TtQz9gyCP1mE38HqNRJ_pmuRIgKnAlMzM,30581
|
183
187
|
py2ls/wb_detector.py,sha256=7y6TmBUj9exCZeIgBAJ_9hwuhkDh1x_-yg4dvNY1_GQ,6284
|
184
|
-
py2ls-0.1.9.
|
185
|
-
py2ls-0.1.9.
|
186
|
-
py2ls-0.1.9.
|
188
|
+
py2ls-0.1.9.9.dist-info/METADATA,sha256=tRTwCfUkzWCGXAIkgA3xlBL4jUN7V6GI-4P4IcSg4Fc,20017
|
189
|
+
py2ls-0.1.9.9.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
190
|
+
py2ls-0.1.9.9.dist-info/RECORD,,
|
File without changes
|