Initial commit
This commit is contained in:
parent
822692d032
commit
8404c5e36b
113 changed files with 2833 additions and 44 deletions
500
.bash_history
Normal file
500
.bash_history
Normal file
|
@ -0,0 +1,500 @@
|
|||
./2-infer.py /nn/7091925/20230208/CT/9 /nn/7091925/20230208/MR/7
|
||||
./1-move.py 6035638
|
||||
./2-infer.py /nn/6035638/20230209/CT/8 /nn/6035638/20230209/MR/7
|
||||
./1-move.py 7030265
|
||||
./2-infer.py /nn/7030265/20230209/CT/9 /nn/7030265/20230209/MR/7
|
||||
./1-move.py 6981439
|
||||
./2-infer.py /nn/6981439/20230210/CT/a /nn/6981439/20230210/MR/7
|
||||
./1-move.py 5665595
|
||||
./2-infer.py /nn/5665595/20230210/CT/9 /nn/5665595/20230210/MR/7
|
||||
./1-move.py 3903066
|
||||
./2-infer.py /nn/3903066/20230213/CT/a /nn/3903066/20230213/MR/7
|
||||
./1-move.py 3903066
|
||||
./2-infer.py /nn/3903066/20230213/CT/9 /nn/3903066/20230213/MR/7
|
||||
./1-move.py 5487071
|
||||
./2-infer.py /nn/5487071/20230213/CT/9 /nn/5487071/20230213/MR/7
|
||||
./1-move.py 6771041
|
||||
./2-infer.py /nn/6771041/20230214/CT/9 /nn/6771041/20230214/MR/7
|
||||
./1-move.py 5495897
|
||||
./2-infer.py /nn/5495897/20230214/CT/9 /nn/5495897/20230214/MR/7
|
||||
./1-move.py 6987123
|
||||
./2-infer.py /nn/6987123/20230215/CT/9 /nn/6987123/20230215/MR/7
|
||||
./1-move.py 3183636
|
||||
./2-infer.py /nn/3183636/20230215/CT/9 /nn/3183636/20230215/MR/7
|
||||
./1-move.py 5768342
|
||||
./2-infer.py /nn/5768342/20230216/CT/9 /nn/5768342/20230216/MR/7
|
||||
./1-move.py 5695691
|
||||
./2-infer.py /nn/5695691/20230216/CT/a /nn/5695691/20230216/MR/7
|
||||
./1-move.py 5768342
|
||||
./2-infer.py /nn/5768342/20230216/CT/9 /nn/5768342/20230216/MR/7
|
||||
./1-move.py 7123316
|
||||
./2-infer.py /nn/7123316/20230220/CT/9 /nn/7123316/20230220/MR/7
|
||||
./1-move.py 5831210
|
||||
./2-infer.py /nn/5831210/20230220/CT/c /nn/5831210/20230220/MR/a
|
||||
./1-move.py 3387187
|
||||
./2-infer.py /nn/3387187/20230221/CT/a /nn/3387187/20230221/MR/7
|
||||
./1-move.py 6803836
|
||||
./2-infer.py /nn/6803836/20230221/CT/10 /nn/6803836/20230221/MR/e
|
||||
./1-move.py
|
||||
./2-infer.py /nn/6466293/20230222/CT/a /nn/6466293/20230222/MR/7
|
||||
./1-move.py 2669302
|
||||
./2-infer.py /nn/2669302/20230223/CT/a /nn/2669302/20230223/MR/7
|
||||
./1-move.py 4607357
|
||||
./2-infer.py /nn/4607357/20230224/CT/a /nn/4607357/20230224/MR/7
|
||||
./1-move.py 7055212
|
||||
./2-infer.py /nn/7055212/20230224/CT/9 /nn/7055212/20230224/MR/7
|
||||
./1-move.py 5027429
|
||||
./2-infer.py /nn/5027429/20230306/CT/b /nn/5027429/20230306/MR/9
|
||||
./1-move.py 7123530
|
||||
./2-infer.py /nn/7123530/20230307/CT/a /nn/7123530/20230307/MR/7
|
||||
./1-move.py 7130932
|
||||
./2-infer.py /nn/7130932/20230307/CT/a /nn/7130932/20230307/MR/7
|
||||
./1-move.py 5771396
|
||||
./2-infer.py /nn/5771396/20230308/CT/a /nn/5771396/20230308/MR/7
|
||||
./1-move.py 7128131
|
||||
./2-infer.py /nn/7128131/20230310/CT/a /nn/7128131/20230310/MR/7
|
||||
./1-move.py 6412311
|
||||
./2-infer.py /nn/6412311/20230313/CT/9 /nn/6412311/20230313/MR/7
|
||||
./1-move.py
|
||||
./2-infer.py /nn/5494530/20230313/CT/a /nn/5494530/20230313/MR/7
|
||||
./1-move.py 7128706
|
||||
./2-infer.py /nn/7128706/20230310/CT/c /nn/7128706/20230310/MR
|
||||
./1-move.py 6925186
|
||||
./2-infer.py /nn/6925186/20230314/CT/a /nn/6925186/20230314/MR/7
|
||||
./1-move.py 3863530
|
||||
./1-move.py 3863530
|
||||
./2-infer.py /nn/3863530/20230314/CT/a /nn/3863530/20230314/MR/7
|
||||
./1-move.py 7131041
|
||||
./2-infer.py /nn/7131041/20230315/CT/a /nn/7131041/20230315/MR/7
|
||||
./1-move.py 5682089
|
||||
./2-infer.py /nn/5682089/20230315/CT/a /nn/5682089/20230315/MR/7
|
||||
./1-move.py 5553220
|
||||
./2-infer.py /nn/5553220/20230316/CT/a /nn/5553220/20230316/MR/7
|
||||
./1-move.py 3589548
|
||||
./2-infer.py /nn/3589548/20230317/CT/9 /nn/3589548/20230317/MR/7
|
||||
./1-move.py 2111161
|
||||
./2-infer.py /nn/2111161/20230317/CT/9 /nn/2111161/20230317/MR/7
|
||||
./1-move.py 6167673
|
||||
./2-infer.py /nn/6167673/20230320/CT/9 /nn/6167673/20230320/MR/7
|
||||
./1-move.py 2372501
|
||||
./2-infer.py /nn/2372501/20230320/CT/c /nn/2372501/20230320/MR/2
|
||||
./1-move.py 7134146
|
||||
./2-infer.py /nn/7134146/20230321/CT/a /nn/7134146/20230321/MR/7
|
||||
./1-move.py 6017134
|
||||
./2-infer.py /nn/6017134/20230321/CT/9 /nn/6017134/20230321/MR/7
|
||||
./1-move.py 5061967
|
||||
./2-infer.py /nn/5061967/20230322/CT/b /nn/5061967/20230322/MR/8
|
||||
./1-move.py 3060758
|
||||
./2-infer.py /nn/3060758/20230322/CT/a /nn/3060758/20230322/MR/7
|
||||
./1-move.py 6943475
|
||||
./2-infer.py /nn/6943475/20230323/CT/9 /nn/6943475/20230323/MR/7
|
||||
./1-move.py 5027838
|
||||
./2-infer.py /nn/5027838/20230323/CT/a /nn/5027838/20230323/MR/7
|
||||
./1-move.py 6783185
|
||||
./2-infer.py /nn/6783185/20230324/CT/a /nn/6783185/20230324/MR/7
|
||||
./1-move.py 4482158
|
||||
./2-infer.py /nn/4482158/20230324/CT/9 /nn/4482158/20230324/MR/7
|
||||
ls /nn
|
||||
ls -ltr /nn
|
||||
ls
|
||||
./1-move.py 4482158
|
||||
./1-move.py 6764185
|
||||
./2-infer.py /nn/6764185/20230327/CT/9 /nn/6764185/20230327/MR/7
|
||||
./1-move.py
|
||||
./2-infer.py /nn/7127857/20230327/CT/a /nn/7127857/20230327/MR/7
|
||||
./1-move.py 6553099
|
||||
./2-infer.py /nn/6553099/20230328/CT/9 /nn/6553099/20230328/MR/7
|
||||
./1-move.py 7040640
|
||||
./2-infer.py /nn/7040640/20230328/CT/a /nn/7040640/20230328/MR/7
|
||||
./1-move.py 6553099
|
||||
./2-infer.py /nn/6553099/20230328/CT/9 /nn/6553099/20230328/MR/7
|
||||
./1-move.py 7106897
|
||||
./2-infer.py /nn/7106897/20230329/CT/a /nn/7106897/20230329/MR/7
|
||||
./1-move.py 5261092
|
||||
./2-infer.py /nn/5261092/20230329/CT/a /nn/5261092/20230329/MR/7
|
||||
./1-move.py 4301162
|
||||
./2-infer.py /nn/4301162/20230330/CT/d /nn/4301162/20230330/MR/7
|
||||
./1-move.py 7131077
|
||||
|
||||
./1-move.py 6996427
|
||||
./1-move.py 6996427
|
||||
./2-infer.py /nn/6996427/20230331/CT/a /nn/6996427/20230331/MR/7
|
||||
./1-move.py 1561614
|
||||
./2-infer.py /nn/1561614/20230331/CT/b /nn/1561614/20230331/MR/8
|
||||
top
|
||||
exit
|
||||
./1-move.py
|
||||
./2-infer.py /nn/6623737/20230406/CT/8 /nn/6623737/20230406/MR/7
|
||||
./1-move.py 6631848
|
||||
./2-infer.py /nn/6631848/20220810/CT/9 /nn/6631848/20230406/MR/7
|
||||
./1-move.py 6631848
|
||||
./2-infer.py /nn/6631848/20230406/CT/a /nn/6631848/20230406/MR/7
|
||||
./2-infer.py /nn/6631848/20230406/CT/a /nn/6631848/20230406/MR/7
|
||||
./2-infer.py /nn/6631848/20230406/CT/a /nn/6631848/20230406/MR/7
|
||||
./2-infer.py /nn/6631848/20230406/CT/a /nn/6631848/20230406/MR/7
|
||||
./2-infer.py /nn/6631848/20230406/CT/a /nn/6631848/20230406/MR/7
|
||||
./1-move.py 6418004
|
||||
./1-move.py 8045956
|
||||
./2-infer.py /nn/8045956/20230407/CT/b /nn/8045956/20230407/MR/7
|
||||
./1-move.py 6418004
|
||||
./2-infer.py /nn/6418004/20230407/CT/8 /nn/6418004/20230407/MR/7
|
||||
./1-move.py 2644799
|
||||
./2-infer.py /nn/2644799/20230410/CT/a /nn/2644799/20230410/MR/7
|
||||
./1-move.py 4379301
|
||||
./2-infer.py /nn/4379301/20230410/CT/a /nn/4379301/20230410/MR/7
|
||||
./1-move.py 6563617
|
||||
./2-infer.py /nn/6563617/20230411/CT/9 /nn/6563617/20230411/MR/2
|
||||
./1-move.py 6739334
|
||||
./2-infer.py /nn/6739334/20230411/CT/8 /nn/6739334/20230411/MR/7
|
||||
./1-move.py 6393784
|
||||
./2-infer.py /nn/6393784/20230412/CT/9 /nn/6393784/20230412/MR/7
|
||||
./1-move.py 6962333
|
||||
./2-infer.py /nn/6962333/20230412/CT/9 /nn/6962333/20230412/MR/7
|
||||
./1-move.py 6474814
|
||||
./2-infer.py /nn/6474814/20230413/CT/a /nn/6474814/20230413/MR/7
|
||||
./1-move.py 2430604
|
||||
./2-infer.py /nn/2430604/20230413/CT/a /nn/2430604/20230413/MR/7
|
||||
./1-move.py 4572736
|
||||
./2-infer.py /nn/4572736/20230414/CT/a /nn/4572736/20230414/MR/7
|
||||
./1-move.py 3905496
|
||||
./2-infer.py /nn/3905496/20230414/CT/a /nn/3905496/20230414/MR/7
|
||||
./1-move.py 5767800
|
||||
./2-infer.py /nn/5767800/20230417/CT/a /nn/5767800/20230417/MR/7
|
||||
./1-move.py 6789767
|
||||
./2-infer.py /nn/6789767/20230417/CT/9 /nn/6789767/20230417/MR/7
|
||||
./1-move.py 5760888
|
||||
./2-infer.py /nn/5760888/20230418/CT/8 /nn/5760888/20230418/MR/7
|
||||
./1-move.py 6700596
|
||||
/nn/6700596/20230418/CT/9 /nn/6700596/20230418/MR/7
|
||||
./2-infer.py /nn/6700596/20230418/CT/9 /nn/6700596/20230418/MR/7
|
||||
./1-move.py 2334044
|
||||
./2-infer.py /nn/2334044/20230419/CT/9 /nn/2334044/20230419/MR/7
|
||||
./1-move.py 3001393
|
||||
./1-move.py 3001393
|
||||
./2-infer.py /nn/3001393/20230419/CT/a /nn/3001393/20230419/MR/7
|
||||
./1-move.py 6596248
|
||||
./2-infer.py /nn/6596248/20230420/CT/a /nn/6596248/20230420/MR/6
|
||||
./1-move.py 7104717
|
||||
./2-infer.py /nn/7104717/20230420/CT/a /nn/7104717/20230420/MR/6
|
||||
./1-move.py 7132783
|
||||
./2-infer.py /nn/7132783/20230421/CT/8 /nn/7132783/20230421/MR/7
|
||||
./1-move.py 7096197
|
||||
./2-infer.py /nn/7096197/20230424/CT/a /nn/7096197/20230424/MR/7
|
||||
./1-move.py 6841107
|
||||
./2-infer.py /nn/6841107/20230424/CT/9 /nn/6841107/20230424/MR/7
|
||||
./1-move.py 2739367
|
||||
./2-infer.py /nn/2739367/20230425/CT/8 /nn/2739367/20230425/MR/7
|
||||
./1-move.py 5789401
|
||||
./2-infer.py /nn/5789401/20230425/CT/a /nn/5789401/20230425/MR/7
|
||||
./1-move.py 1845653
|
||||
./2-infer.py /nn/1845653/20230426/CT/a /nn/1845653/20230426/MR/7
|
||||
./1-move.py 5956729
|
||||
./2-infer.py /nn/5956729/20230426/CT/a /nn/5956729/20230426/MR/7
|
||||
./1-move.py 5956729
|
||||
./2-infer.py /nn/5956729/20230426/CT/a /nn/5956729/20230426/MR/7
|
||||
./1-move.py 7137162
|
||||
./2-infer.py /nn/7137162/20230427/CT/a /nn/7137162/20230427/MR/7
|
||||
./1-move.py 8003599
|
||||
./2-infer.py /nn/8003599/20230427/CT/a /nn/8003599/20230427/MR/7
|
||||
./1-move.py 7138225
|
||||
./2-infer.py /nn/7138225/20230428/CT/a /nn/7138225/20230428/MR/7
|
||||
./1-move.py 3698229
|
||||
./2-infer.py /nn/3698229/20230428/CT/a /nn/3698229/20230428/MR/7
|
||||
./1-move.py 3391186
|
||||
./2-infer.py /nn/3391186/20230501/CT/9 /nn/3391186/20230501/MR/7
|
||||
./1-move.py 3698229
|
||||
./2-infer.py /nn/3698229/20230428/CT/9 /nn/3698229/20230428/MR/6
|
||||
./1-move.py 6793968
|
||||
./2-infer.py /nn/6793968/20230501/CT/d /nn/6793968/20230501/MR/7
|
||||
./1-move.py 6815738
|
||||
./2-infer.py /nn/6815738/20230502/CT/8 /nn/6815738/20230502/MR/7
|
||||
./1-move.py 7108421
|
||||
./2-infer.p
|
||||
./1-move.py 4255849
|
||||
./2-infer.py /nn/4255849/20230503/CT/9 /nn/4255849/20230503/MR/6
|
||||
./1-move.py 6688931
|
||||
./2-infer.py /nn/6688931/20230503/CT/a /nn/6688931/20230503/MR/7
|
||||
./1-move.py 6688931
|
||||
./2-infer.py /nn/6688931/20230503/CT/a /nn/6688931/20230503/MR/7
|
||||
./1-move.py 6719072
|
||||
./2-infer.py /nn/6719072/20230504/CT/a /nn/6719072/20230504/MR/7
|
||||
./1-move.py 6805343
|
||||
./2-infer.py /nn/6805343/20230504/CT/a /nn/6805343/20230504/MR/1
|
||||
./1-move.py 4273476
|
||||
./2-infer.py /nn/4273476/20230505/CT/a /nn/4273476/20230505/MR/7
|
||||
./1-move.py 7104717
|
||||
./2-infer.py /nn/7104717/20230505/CT/a /nn/7104717/20230505/MR/7
|
||||
./1-move.py 5689608
|
||||
./2-infer.py /nn/5689608/20230508/CT/a /nn/5689608/20230508/MR/7
|
||||
./1-move.py 3277833
|
||||
./2-infer.py /nn/3277833/20230508/CT/a /nn/3277833/20230508/MR/7
|
||||
./1-move.py 3463014
|
||||
./1-move.py 2772372
|
||||
./2-infer.py /nn/2772372/20230509/CT/a /nn/2772372/20230509/MR/7
|
||||
./1-move.py 5726776
|
||||
./2-infer.py /nn/5726776/20230510/CT/5 /nn/5726776/20230510/MR/2
|
||||
./1-move.py 3276632
|
||||
./2-infer.py /nn/3276632/20230511/CT/9 /nn/3276632/20230511/MR/7
|
||||
./1-move.py 3566418
|
||||
./2-infer.py /nn/3566418/20230511/CT/9 /nn/3566418/20230511/MR/7
|
||||
./1-move.py 3566418
|
||||
/nn/3566418/20230511/CT/8 /nn/3566418/20230511/MR/7
|
||||
./2-infer.py /nn/3566418/20230511/CT/8 /nn/3566418/20230511/MR/7
|
||||
./1-move.py 3994172
|
||||
./2-infer.py /nn/3994172/20230512/CT/8 /nn/3994172/20230512/MR/7
|
||||
./1-move.py 5868361
|
||||
./2-infer.py /nn/5868361/20230512/CT/8 /nn/5868361/20230512/MR/7
|
||||
./1-move.py 7146459
|
||||
./2-infer.py /nn/7146459/20230515/CT/a /nn/7146459/20230515/MR/7
|
||||
./1-move.py 7124386
|
||||
./1-move.py 7124386
|
||||
./2-infer.py /nn/7124386/20230515/CT/a /nn/7124386/20230515/MR/7
|
||||
./1-move.py 7127462
|
||||
./2-infer.py /nn/7127462/20230516/CT/4 /nn/7127462/20230516/MR/3
|
||||
./1-move.py 6510305
|
||||
./2-infer.py /nn/6510305/20230516/CT/9 /nn/6510305/20230516/MR/7
|
||||
./1-move.py 7128841
|
||||
./2-infer.py /nn/7128841/20230517/CT/8 /nn/7128841/20230517/MR/6
|
||||
./1-move.py 6400837
|
||||
./2-infer.py /nn/6400837/20230517/CT/8 /nn/6400837/20230517/MR/7
|
||||
./1-move.py 6743139
|
||||
./2-infer.py /nn/6743139/20230518/CT/c /nn/6743139/20230518/MR/6
|
||||
./1-move.py 3561770
|
||||
./2-infer.py /nn/3561770/20230518/CT/9 /nn/3561770/20230518/MR/6
|
||||
./1-move.py 3561770
|
||||
./2-infer.py /nn/3561770/20230518/CT/9 /nn/3561770/20230518/MR/7
|
||||
./1-move.py 7138891
|
||||
./2-infer.py /nn/7138891/20230522/CT/9 MAR /nn/7138891/20230522/MR/7
|
||||
./1-move.py 2508411
|
||||
./2-infer.py /nn/2508411/20230522/CT/a /nn/2508411/20230522/MR/7
|
||||
./1-move.py 7138891
|
||||
/nn/7138891/20230522/CT/9 /nn/7138891/20230522/MR/7
|
||||
./2-infer.py /nn/7138891/20230522/CT/9 /nn/7138891/20230522/MR/7
|
||||
./1-move.py 7021220
|
||||
./2-infer.py /nn/7021220/20230523/CT/9 /nn/7021220/20230523/MR/7
|
||||
./1-move.py 3978624
|
||||
./2-infer.py /nn/3978624/20230523/CT/9 /nn/3978624/20230523/MR/7
|
||||
./1-move.py 7144666
|
||||
./2-infer.py /nn/7144666/20230525/CT/9 /nn/7144666/20230525/MR/7
|
||||
./1-move.py 6861756
|
||||
./2-infer.py /nn/6861756/20230525/CT/a /nn/6861756/20230525/MR/7
|
||||
./1-move.py 4500037
|
||||
./2-infer.py /nn/4500037/20230526/CT/a /nn/4500037/20230526/MR/6
|
||||
./1-move.py 7128016
|
||||
./2-infer.py /nn/7128016/20230526/CT/a /nn/7128016/20230526/MR/6
|
||||
./1-move.py 7135342
|
||||
./2-infer.py /nn/7135342/20230529/CT/b /nn/7135342/20230529/MR/8
|
||||
./1-move.py 7046657
|
||||
./2-infer.py /nn/7046657/20230529/CT/a /nn/7046657/20230529/MR/7
|
||||
./1-move.py 5494513
|
||||
./2-infer.py /nn/5494513/20230530/CT/5 /nn/5494513/20230530/MR/2
|
||||
./1-move.py
|
||||
./2-infer
|
||||
./1-move.py 6825963
|
||||
./2-infer.py /nn/6825963/20230531/CT/9 /nn/6825963/20230531/MR/7
|
||||
./1-move.py 7074124
|
||||
./2-infer.py /nn/7074124/20230531/CT/b /nn/7074124/20230531/MR/7
|
||||
./1-move.py 5168451
|
||||
./2-infer.py /nn/5168451/20230601/CT/9 /nn/5168451/20230601/MR/7
|
||||
./1-move.py
|
||||
./2-infer.py /nn/3924866/20230601/CT/a /nn/3924866/20230601/MR/7
|
||||
./1-move.py 7008354
|
||||
./2-infer.py /nn/7008354/20230602/CT/8 /nn/7008354/20230602/MR/7
|
||||
./1-move.py 5665595
|
||||
./2-infer.py /nn/5665595/20230605/CT/9 /nn/5665595/20230605/MR/7
|
||||
./1-move.py 7115427
|
||||
./2-infer.py /nn/7115427/20230605/CT/9 /nn/7115427/20230605/MR/7
|
||||
./1-move.py 2567501
|
||||
./2-infer.py /nn/2567501/20230606/CT/8 /nn/2567501/20230606/MR/7
|
||||
./1-move.py 5569945
|
||||
./2-infer.p
|
||||
./1-move.py 7144930
|
||||
./2-infer.py /nn/7144930/20230607/CT/9 /nn/7144930/20230607/MR/7
|
||||
./1-move.py 6744457
|
||||
./2-infer.py /nn/6744457/20230607/CT/9 /nn/6744457/20230607/MR/7
|
||||
./1-move.py 2313478
|
||||
./2-infer.py /nn/2313478/20230608/CT/a /nn/2313478/20230608/MR/6
|
||||
./1-move.py 7146030
|
||||
./2-infer.py /nn/7146030/20230609/CT/a /nn/7146030/20230609/MR/7
|
||||
./1-move.py 1994656
|
||||
./2-infer.py /nn/1994656/20230609/CT/a /nn/1994656/20230609/MR/7
|
||||
./1-move.py 1784858
|
||||
./2-infer.py /nn/1784858/20230612/CT/a /nn/1784858/20230612/MR/7
|
||||
./1-move.py 6507299
|
||||
./2-infer.py /nn/6507299/20230612/CT/a /nn/6507299/20230612/MR/7
|
||||
./1-move.py 6305556
|
||||
./2-infer.py /nn/6305556/20230613/CT/9 /nn/6305556/[A
|
||||
./1-move.py 6305556
|
||||
./2-infer.py /nn/6305556/20230613/CT/9 /nn/6305556/20230613/MR/7
|
||||
./1-move.py
|
||||
./2-infer.py /nn/2559243/20230613/CT/a /nn/2559243/20230613/MR/7
|
||||
./1-move.py 7112382
|
||||
./2-infer.py /nn/7112382/20230614/CT/a /nn/7112382/20230614/MR/7
|
||||
./1-move.py 6460301
|
||||
./2-infer.py /nn/6460301/20230614/CT/9 /nn/6460301/20230614/MR/7
|
||||
nvidia-smi
|
||||
./1-move.py 1325527
|
||||
./2-infer.py /nn/1325527/20230615/CT/9 /nn/1325527/20230615/MR/7
|
||||
./1-move.py 7018112
|
||||
./2-infer.py /nn/7018112/20230615/CT/9 /nn/7018112/20230615/MR/7
|
||||
./1-move.py 6647069
|
||||
./2-infer.py /nn/6647069/20230616/CT/a /nn/6647069/20230616/MR/7
|
||||
./1-move.py 7150687
|
||||
./2-infer.py /nn/7150687/20230616/CT/9 /nn/7150687/20230616/MR/7
|
||||
./1-move.py 6746593
|
||||
./2-infer.py /nn/6746593/20230619/CT/9 /nn/6746593/20230619/MR/7
|
||||
./1-move.py 7024631
|
||||
./2-infer.py /nn/7024631/20230619/CT/a /nn/7024631/20230619/MR/7
|
||||
./1-move.py 3384498
|
||||
./2-infer.py /nn/3384498/20230620/CT/a /nn/3384498/20230620/MR/7
|
||||
./1-move.py 7113684
|
||||
./2-infer.py /nn/7113684/20230620/CT/a /nn/7113684/20230620/MR/7
|
||||
./1-move.py 5053997
|
||||
./2-infer.py /nn/5053997/20230621/CT/a /nn/5053997/20230621/MR/7
|
||||
./1-move.py 5522920
|
||||
./2-infer.py /nn/5522920/20230621/CT/a /nn/5522920/20230621/MR/7
|
||||
./1-move.py 5522920
|
||||
./2-infer.py /nn/5522920/20230621/CT/a /nn/5522920/20230621/MR/7
|
||||
./1-move.py 7152084
|
||||
./2-infer.py /nn/7152084/20230623/CT/a /nn/7152084/20230623/MR/7
|
||||
./1-move.py 6354781
|
||||
./2-infer.py /nn/6354781/20230623/CT/a /nn/6354781/20230623/MR/7
|
||||
./1-move.py 3950552
|
||||
./2-infer.py /nn/3950552/20230626/CT/8 /nn/3950552/20230626/MR/7
|
||||
./1-move.py 6699766
|
||||
./2-infer.py /nn/6699766/20230626/CT/9 /nn/6699766/20230626/MR/7
|
||||
./1-move.py 7143289
|
||||
./2-infer.py /nn/7143289/20230627/CT/8 /nn/7143289/20230627/MR/7
|
||||
./1-move.py 6716839
|
||||
./2-infer.py /nn/6716839/20230627/CT/8 /nn/6716839/20230627/MR/7
|
||||
./1-move.py 7152103
|
||||
./2-infer.py /nn/7152103/20230628/CT/9 /nn/7152103/20230628/MR/7
|
||||
./1-move.py 6119992
|
||||
./2-infer.py /nn/6119992/20230628/CT/9 /nn/6119992/20230628/MR/7
|
||||
./1-move.py 6224878
|
||||
./2-infer.py /nn/6224878/20230629/CT/9 /nn/6224878/20230629/MR/6
|
||||
./1-move.py 7147425
|
||||
./2-infer.py /nn/7147425/20230629/CT/9 /nn/7147425/20230629/MR/7
|
||||
./1-move.py 7152233
|
||||
./2-infer.py /nn/7152233/20230630/CT/a /nn/7152233/20230630/MR/6
|
||||
./1-move.py 711176
|
||||
./2-infer.py /nn/7111769/20230630/CT/a /nn/7111769/20230630/MR/7
|
||||
./1-move.py 7130901
|
||||
./2-infer.py /nn/7130901/20230703/CT/a /nn/7130901/20230703/MR/7
|
||||
./1-move.py 7150422
|
||||
|
||||
./1-move.py 7111769
|
||||
./1-move.py 6106176
|
||||
./2-infer.py /nn/6106176/20230704/CT/a /nn/6106176/20230704/MR/7
|
||||
./1-move.py 3889924
|
||||
./2-infer.py /nn/3889924/20230704/CT/9 /nn/3889924/20230704/MR/7
|
||||
./1-move.py 3678428
|
||||
./2-infer.py /nn/3678428/20230705/CT/a /nn/3678428/20230705/MR/6
|
||||
./1-move.py 7155718
|
||||
./2-infer.py /nn/7155718/20230705/CT/a /nn/7155718/20230705/MR/7
|
||||
./1-move.py
|
||||
./1-move.py 6803603
|
||||
./2-infer.py /nn/6803603/20230706/CT/9 /nn/6803603/20230706/MR/7
|
||||
./1-move.py 4153961
|
||||
./2-infer.py /nn/4153961/20230706/CT/9 /nn/4153961/20230706/MR/7
|
||||
./1-move.py
|
||||
./2-infer.py /nn/6510305/20230707/CT/8 /nn/6510305/20230707/MR/7
|
||||
./1-move.py 5369780
|
||||
./2-infer.py /nn/5369780/20230707/CT/9 /nn/5369780/20230707/MR/7
|
||||
./1-move.py 7111644
|
||||
./2-infer.py /nn/7111644/20230710/CT/9 /nn/7111644/20230710/MR/7
|
||||
./1-move.py 3247320
|
||||
./2-infer.py /nn/3247320/20230710/CT/9 /nn/3247320/20230710/MR/7
|
||||
./1-move.py 3782801
|
||||
./1-move.py 3782810
|
||||
./2-infer.py /nn/3782810/20230711/CT/a /nn/3782810/20230711/MR/7
|
||||
./1-move.py 7047930
|
||||
./2-infer.py /nn/7047930/20230711/CT/8 /nn/7047930/20230711/MR/2
|
||||
./1-move.py 7155947
|
||||
./2-infer.py /nn/7155947/20230712/CT/9 /nn/7155947/20230712/MR/7
|
||||
./1-move.py 6607568
|
||||
./2-infer.py /nn/6607568/20230712/CT/9 /nn/6607568/20230712/MR/7
|
||||
./1-move.py 5638465
|
||||
./2-infer.py /nn/5638465/20230713/CT/9 /nn/5638465/20230713/MR/2
|
||||
./1-move.py 2855422
|
||||
./2-infer.py /nn/2855422/20230713/CT/9 /nn/2855422/20230713/MR/2
|
||||
./1-move.py 4118618
|
||||
./2-infer.py /nn/4118618/20230714/CT/d /nn/4118618/20230714/MR/8
|
||||
./1-move.py 7138156
|
||||
./2-infer.py /nn/7138156/20230714/CT/9 /nn/7138156/20230714/MR/7
|
||||
22444455555555444444./1-move.py 14444454555
|
||||
./1-move.py 4214975
|
||||
./2-infer.py /nn/4214975/20230717/CT/c /nn/4214975/20230717/MR/8
|
||||
./1-move.py 3485443
|
||||
./2-infer.py /nn/3485443/20230717/CT/a /nn/3485443/20230717/MR/7
|
||||
./1-move.py 6824186
|
||||
./2-infer.py /nn/6824186/20230718/CT/9 /nn/6824186/20230718/MR/7
|
||||
./1-move.py 6547497
|
||||
./2-infer.py /nn/6547497/20230718/CT/8 /nn/6547497/20230718/MR/7
|
||||
./1-move.py 1875185
|
||||
./2-infer.py /nn/1875185/20230719/CT/a /nn/1875185/20230719/MR/6
|
||||
./1-move.py 7023789
|
||||
./2-infer.py /nn/7023789/20230719/CT/a /nn/7023789/20230719/MR/6
|
||||
./1-move.py 2098952
|
||||
./2-infer.py /nn/2098952/20230720/CT/a /nn/2098952/20230720/MR/6
|
||||
./1-move.py 7151783
|
||||
./2-infer.py /nn/7151783/20230720/CT/a /nn/7151783/20230720/MR/7
|
||||
./1-move.py 7075650
|
||||
./2-infer.py /nn/7075650/20230721/CT/9 /nn/7075650/20230721/MR/7
|
||||
./1-move.py 4352680
|
||||
./2-infer.py /nn/4352680/20230721/CT/9 MAR
|
||||
./2-infer.py /nn/4352680/20230721/CT/9 MAR /nn/4352680/20230721/MR/7
|
||||
./1-move.py 4352680
|
||||
./2-infer.py /nn/4352680/20230721/CT/a /nn/4352680/20230721/MR/7
|
||||
./1-move.py 7144639
|
||||
./2-infer.py /nn/7144639/20230724/CT/a /nn/7144639/20230724/MR/3
|
||||
./1-move.py 4505405
|
||||
./2-infer.py /nn/4505405/20230724/CT/9 /nn/4505405/20230724/MR/7
|
||||
./1-move.py 7157433
|
||||
./2-infer.py /nn/7157433/20230725/CT/b /nn/7157433/20230725/MR/7
|
||||
./1-move.py 3283427
|
||||
./2-infer.py /nn/3283427/20230725/CT/9 /nn/3283427/20230725/MR/7
|
||||
./1-move.py 6401745
|
||||
./2-infer.py /nn/6401745/20230726/CT/a /nn/6401745/20230726/MR/6
|
||||
./1-move.py 4383470
|
||||
./2-infer.py /nn/4383470
|
||||
./1-move.py 1994335
|
||||
./2-infer.py /nn/1994335/20230727/CT/9 /nn/1994335/20230727/MR/7
|
||||
./1-move.py 6184547
|
||||
./2-infer.py /nn/6184547/20230728/CT/a /nn/6184547/20230728/MR/7
|
||||
./1-move.py 5223617
|
||||
./2-infer.py /nn/5223617/20220520/CT/8 /nn/5223617/20230728/MR/7
|
||||
./1-move.py /nn/5223617/20230728/MR/7
|
||||
|
||||
./1-move.py 5223617
|
||||
./1-move.py /nn/5223617/20230728/CT/8 /nn/5223617/20230728/MR/7
|
||||
./1-move.py /nn/5223617/20230728/CT/8 /nn/5223617/20230728/MR/7
|
||||
./2-infer.py /nn/5223617/20220520/CT/8 /nn/5223617/20230728/MR/7
|
||||
./1-move.py 1003532
|
||||
./2-infer.py /nn/1003532/20230728/CT/9 /nn/1003532/20230728/MR/2
|
||||
./1-move.py 5223617
|
||||
./2-infer.py /nn/5223617/20230728/CT/8 /nn/5223617/20230728/MR/7
|
||||
./1-move.py 3307080
|
||||
./2-infer.py /nn/3307080/20230731/CT/8 /nn/3307080/20230731/MR/7
|
||||
./1-move.py 3307080
|
||||
./2-infer.py /nn/3307080/20230731/CT/8 /nn/3307080/20230731/MR/7
|
||||
./1-move.py 2431392
|
||||
./2-infer.py /nn/2431392/20230731/CT/9 /nn/2431392/20230731/MR/2
|
||||
./1-move.py 7155758
|
||||
./2-infer.py /nn/7155758/20230801/CT/a /nn/7155758/20230801/MR/7
|
||||
./1-move.py 5879999
|
||||
./2-infer.py /nn/5879999/20230801/CT/a /nn/5879999/20230801/MR/7
|
||||
./1-move.py 6460676
|
||||
./2-infer.py /nn/6460676/20230802/CT/9 /nn/6460676/20230802/MR/7
|
||||
./1-move.py 4107788
|
||||
./2-infer.py /nn/4107788/20230802/CT/a /nn/4107788/20230802/MR/7
|
||||
./1-move.py 7159471
|
||||
./2-infer.py /nn/7159471/20
|
||||
./1-move.py 7159471
|
||||
./2-infer.py /nn/7159471/20230804/CT/a /nn/7159471/20230804/MR/7
|
||||
ps aux
|
||||
ps aux
|
||||
ps aux
|
||||
nvidia-smi
|
||||
nvidia-smi
|
||||
nvidia-smi
|
98
.bash_history-00353.tmp
Normal file
98
.bash_history-00353.tmp
Normal file
|
@ -0,0 +1,98 @@
|
|||
./2-infer.py /nn/7091925/20230208/CT/9 /nn/7091925/20230208/MR/7
|
||||
./1-move.py 6035638
|
||||
./2-infer.py /nn/6035638/20230209/CT/8 /nn/6035638/20230209/MR/7
|
||||
./1-move.py 7030265
|
||||
./2-infer.py /nn/7030265/20230209/CT/9 /nn/7030265/20230209/MR/7
|
||||
./1-move.py 6981439
|
||||
./2-infer.py /nn/6981439/20230210/CT/a /nn/6981439/20230210/MR/7
|
||||
./1-move.py 5665595
|
||||
./2-infer.py /nn/5665595/20230210/CT/9 /nn/5665595/20230210/MR/7
|
||||
./1-move.py 3903066
|
||||
./2-infer.py /nn/3903066/20230213/CT/a /nn/3903066/20230213/MR/7
|
||||
./1-move.py 3903066
|
||||
./2-infer.py /nn/3903066/20230213/CT/9 /nn/3903066/20230213/MR/7
|
||||
./1-move.py 5487071
|
||||
./2-infer.py /nn/5487071/20230213/CT/9 /nn/5487071/20230213/MR/7
|
||||
./1-move.py 6771041
|
||||
./2-infer.py /nn/6771041/20230214/CT/9 /nn/6771041/20230214/MR/7
|
||||
./1-move.py 5495897
|
||||
./2-infer.py /nn/5495897/20230214/CT/9 /nn/5495897/20230214/MR/7
|
||||
./1-move.py 6987123
|
||||
./2-infer.py /nn/6987123/20230215/CT/9 /nn/6987123/20230215/MR/7
|
||||
./1-move.py 3183636
|
||||
./2-infer.py /nn/3183636/20230215/CT/9 /nn/3183636/20230215/MR/7
|
||||
./1-move.py 5768342
|
||||
./2-infer.py /nn/5768342/20230216/CT/9 /nn/5768342/20230216/MR/7
|
||||
./1-move.py 5695691
|
||||
./2-infer.py /nn/5695691/20230216/CT/a /nn/5695691/20230216/MR/7
|
||||
./1-move.py 5768342
|
||||
./2-infer.py /nn/5768342/20230216/CT/9 /nn/5768342/20230216/MR/7
|
||||
./1-move.py 7123316
|
||||
./2-infer.py /nn/7123316/20230220/CT/9 /nn/7123316/20230220/MR/7
|
||||
./1-move.py 5831210
|
||||
./2-infer.py /nn/5831210/20230220/CT/c /nn/5831210/20230220/MR/a
|
||||
./1-move.py 3387187
|
||||
./2-infer.py /nn/3387187/20230221/CT/a /nn/3387187/20230221/MR/7
|
||||
./1-move.py 6803836
|
||||
./2-infer.py /nn/6803836/20230221/CT/10 /nn/6803836/20230221/MR/e
|
||||
./1-move.py
|
||||
./2-infer.py /nn/6466293/20230222/CT/a /nn/6466293/20230222/MR/7
|
||||
./1-move.py 2669302
|
||||
./2-infer.py /nn/2669302/20230223/CT/a /nn/2669302/20230223/MR/7
|
||||
./1-move.py 4607357
|
||||
./2-infer.py /nn/4607357/20230224/CT/a /nn/4607357/20230224/MR/7
|
||||
./1-move.py 7055212
|
||||
./2-infer.py /nn/7055212/20230224/CT/9 /nn/7055212/20230224/MR/7
|
||||
./1-move.py 5027429
|
||||
./2-infer.py /nn/5027429/20230306/CT/b /nn/5027429/20230306/MR/9
|
||||
./1-move.py 7123530
|
||||
./2-infer.py /nn/7123530/20230307/CT/a /nn/7123530/20230307/MR/7
|
||||
./1-move.py 7130932
|
||||
./2-infer.py /nn/7130932/20230307/CT/a /nn/7130932/20230307/MR/7
|
||||
./1-move.py 5771396
|
||||
./2-infer.py /nn/5771396/20230308/CT/a /nn/5771396/20230308/MR/7
|
||||
./1-move.py 7128131
|
||||
./2-infer.py /nn/7128131/20230310/CT/a /nn/7128131/20230310/MR/7
|
||||
./1-move.py 6412311
|
||||
./2-infer.py /nn/6412311/20230313/CT/9 /nn/6412311/20230313/MR/7
|
||||
./1-move.py
|
||||
./2-infer.py /nn/5494530/20230313/CT/a /nn/5494530/20230313/MR/7
|
||||
./1-move.py 7128706
|
||||
./2-infer.py /nn/7128706/20230310/CT/c /nn/7128706/20230310/MR
|
||||
./1-move.py 6925186
|
||||
./2-infer.py /nn/6925186/20230314/CT/a /nn/6925186/20230314/MR/7
|
||||
./1-move.py 3863530
|
||||
./1-move.py 3863530
|
||||
./2-infer.py /nn/3863530/20230314/CT/a /nn/3863530/20230314/MR/7
|
||||
./1-move.py 7131041
|
||||
./2-infer.py /nn/7131041/20230315/CT/a /nn/7131041/20230315/MR/7
|
||||
./1-move.py 5682089
|
||||
./2-infer.py /nn/5682089/20230315/CT/a /nn/5682089/20230315/MR/7
|
||||
./1-move.py 5553220
|
||||
./2-infer.py /nn/5553220/20230316/CT/a /nn/5553220/20230316/MR/7
|
||||
./1-move.py 3589548
|
||||
./2-infer.py /nn/3589548/20230317/CT/9 /nn/3589548/20230317/MR/7
|
||||
./1-move.py 2111161
|
||||
./2-infer.py /nn/2111161/20230317/CT/9 /nn/2111161/20230317/MR/7
|
||||
./1-move.py 6167673
|
||||
./2-infer.py /nn/6167673/20230320/CT/9 /nn/6167673/20230320/MR/7
|
||||
./1-move.py 2372501
|
||||
./2-infer.py /nn/2372501/20230320/CT/c /nn/2372501/20230320/MR/2
|
||||
./1-move.py 7134146
|
||||
./2-infer.py /nn/7134146/20230321/CT/a /nn/7134146/20230321/MR/7
|
||||
./1-move.py 6017134
|
||||
./2-infer.py /nn/6017134/20230321/CT/9 /nn/6017134/20230321/MR/7
|
||||
./1-move.py 5061967
|
||||
./2-infer.py /nn/5061967/20230322/CT/b /nn/5061967/20230322/MR/8
|
||||
./1-move.py 3060758
|
||||
./2-infer.py /nn/3060758/20230322/CT/a /nn/3060758/20230322/MR/7
|
||||
./1-move.py 6943475
|
||||
./2-infer.py /nn/6943475/20230323/CT/9 /nn/6943475/20230323/MR/7
|
||||
./1-move.py 5027838
|
||||
./2-infer.py /nn/5027838/20230323/CT/a /nn/5027838/20230323/MR/7
|
||||
./1-move.py 6783185
|
||||
./2-infer.py /nn/6783185/20230324/CT/a /nn/6783185/20230324/MR/7
|
||||
./1-move.py 4482158
|
||||
./2-infer.py /nn/4482158/20230324/CT/9 /nn/4482158/20230324/MR/7
|
||||
ls /nn
|
||||
ls -ltr /nn
|
163
.gitignore
vendored
Normal file
163
.gitignore
vendored
Normal file
|
@ -0,0 +1,163 @@
|
|||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
share/python-wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
MANIFEST
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.nox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*.cover
|
||||
*.py,cover
|
||||
.hypothesis/
|
||||
.pytest_cache/
|
||||
cover/
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
local_settings.py
|
||||
db.sqlite3
|
||||
db.sqlite3-journal
|
||||
|
||||
# Flask stuff:
|
||||
instance/
|
||||
.webassets-cache
|
||||
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
.pybuilder/
|
||||
target/
|
||||
|
||||
# Jupyter Notebook
|
||||
.ipynb_checkpoints
|
||||
|
||||
# IPython
|
||||
profile_default/
|
||||
ipython_config.py
|
||||
|
||||
# pyenv
|
||||
# For a library or package, you might want to ignore these files since the code is
|
||||
# intended to run in multiple environments; otherwise, check them in:
|
||||
# .python-version
|
||||
|
||||
# pipenv
|
||||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
||||
# install all needed dependencies.
|
||||
#Pipfile.lock
|
||||
|
||||
# poetry
|
||||
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
||||
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
||||
# commonly ignored for libraries.
|
||||
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
||||
#poetry.lock
|
||||
|
||||
# pdm
|
||||
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
||||
#pdm.lock
|
||||
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
||||
# in version control.
|
||||
# https://pdm.fming.dev/#use-with-ide
|
||||
.pdm.toml
|
||||
|
||||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
||||
__pypackages__/
|
||||
|
||||
# Celery stuff
|
||||
celerybeat-schedule
|
||||
celerybeat.pid
|
||||
|
||||
# SageMath parsed files
|
||||
*.sage.py
|
||||
|
||||
# Environments
|
||||
.env
|
||||
.venv
|
||||
env/
|
||||
venv/
|
||||
ENV/
|
||||
env.bak/
|
||||
venv.bak/
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
.spyproject
|
||||
|
||||
# Rope project settings
|
||||
.ropeproject
|
||||
|
||||
# mkdocs documentation
|
||||
/site
|
||||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
.dmypy.json
|
||||
dmypy.json
|
||||
|
||||
# Pyre type checker
|
||||
.pyre/
|
||||
|
||||
# pytype static type analyzer
|
||||
.pytype/
|
||||
|
||||
# Cython debug symbols
|
||||
cython_debug/
|
||||
|
||||
# PyCharm
|
||||
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
||||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
||||
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||
#.idea/
|
||||
|
||||
*.nii
|
||||
*.nii.gz
|
5
.jupyter/jupyter_notebook_config.json
Normal file
5
.jupyter/jupyter_notebook_config.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"NotebookApp": {
|
||||
"password": "argon2:$argon2id$v=19$m=10240,t=10,p=8$/HEcZ8SGmRfbiGy+ShUi3w$z9qZcXIgssWhW8t+ck11DQ"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
|
||||
defaultViewers: {
|
||||
html: "Editor"
|
||||
}
|
||||
|
||||
}
|
1
.jupyter/lab/workspaces/lab-a511.jupyterlab-workspace
Normal file
1
.jupyter/lab/workspaces/lab-a511.jupyterlab-workspace
Normal file
|
@ -0,0 +1 @@
|
|||
{"data":{"layout-restorer:data":{"main":{"dock":{"type":"tab-area","currentIndex":1,"widgets":["editor:1-move.py","terminal:1","terminal:2","editor:2-infer.py","editor:adding.py"]},"mode":"multiple-document","current":"terminal:1"},"left":{"collapsed":false,"current":"filebrowser","widgets":["filebrowser","running-sessions","command-palette","jp-property-inspector","tab-manager","extensionmanager.main-view"]},"right":{"collapsed":true,"widgets":[]}},"@jupyterlab/settingeditor-extension:plugin":{"sizes":[0.16252955082742318,0.8374704491725768],"container":{"plugin":"@jupyterlab/terminal-extension:plugin","sizes":[0.4873891008009604,0.5126108991990396]}},"file-browser-filebrowser:cwd":{"path":""},"editor:2-infer.py":{"data":{"path":"2-infer.py","factory":"Editor"}},"editor:1-move.py":{"data":{"path":"1-move.py","factory":"Editor"}},"editor:adding.py":{"data":{"path":"adding.py","factory":"Editor"}},"terminal:1":{"data":{"name":"1"}},"terminal:2":{"data":{"name":"2"}}},"metadata":{"id":"/lab"}}
|
|
@ -0,0 +1 @@
|
|||
{"data":{"layout-restorer:data":{"main":{"dock":{"type":"tab-area","currentIndex":3,"widgets":["editor:1-move.py","editor:2-infer.py","editor:adding.py","terminal:1"]},"mode":"multiple-document","current":"terminal:1"},"left":{"collapsed":false,"current":"filebrowser","widgets":["filebrowser","running-sessions","command-palette","jp-property-inspector","tab-manager","extensionmanager.main-view"]},"right":{"collapsed":true,"widgets":[]}},"@jupyterlab/settingeditor-extension:plugin":{"sizes":[0.16252955082742318,0.8374704491725768],"container":{"plugin":"@jupyterlab/terminal-extension:plugin","sizes":[0.4873891008009604,0.5126108991990396]}},"file-browser-filebrowser:cwd":{"path":""},"editor:2-infer.py":{"data":{"path":"2-infer.py","factory":"Editor"}},"editor:1-move.py":{"data":{"path":"1-move.py","factory":"Editor"}},"editor:adding.py":{"data":{"path":"adding.py","factory":"Editor"}},"terminal:1":{"data":{"name":"1"}}},"metadata":{"id":"/lab/workspaces/auto-c"}}
|
|
@ -0,0 +1 @@
|
|||
{"data":{"layout-restorer:data":{"main":{"dock":{"type":"tab-area","currentIndex":7,"widgets":["editor:1-move.py","editor:2-infer.py","editor:myapp/config/providers.py","editor:myapp/config/auth.py","editor:myapp/routes/api.py","editor:docker/qrun.sh","editor:myapp/routes/web.py","terminal:1","setting-editor:setting-editor","editor:myapp/Kernel.py"]},"mode":"multiple-document","current":"terminal:1"},"left":{"collapsed":false,"current":"filebrowser","widgets":["filebrowser","running-sessions","command-palette","jp-property-inspector","tab-manager","extensionmanager.main-view"]},"right":{"collapsed":true,"widgets":[]}},"file-browser-filebrowser:cwd":{"path":"docker"},"editor:2-infer.py":{"data":{"path":"2-infer.py","factory":"Editor"}},"editor:1-move.py":{"data":{"path":"1-move.py","factory":"Editor"}},"editor:myapp/config/providers.py":{"data":{"path":"myapp/config/providers.py","factory":"Editor"}},"editor:myapp/config/auth.py":{"data":{"path":"myapp/config/auth.py","factory":"Editor"}},"editor:myapp/Kernel.py":{"data":{"path":"myapp/Kernel.py","factory":"Editor"}},"editor:myapp/routes/web.py":{"data":{"path":"myapp/routes/web.py","factory":"Editor"}},"editor:myapp/routes/api.py":{"data":{"path":"myapp/routes/api.py","factory":"Editor"}},"editor:docker/qrun.sh":{"data":{"path":"docker/qrun.sh","factory":"Editor"}},"terminal:1":{"data":{"name":"1"}},"setting-editor:setting-editor":{"data":{}},"@jupyterlab/settingeditor-extension:plugin":{"sizes":[0.23954703832752614,0.7604529616724739],"container":{"plugin":"@jupyterlab/console-extension:tracker","sizes":[0.48738910080096043,0.5126108991990396]}}},"metadata":{"id":"/lab/workspaces/auto-d"}}
|
|
@ -0,0 +1 @@
|
|||
{"data":{"layout-restorer:data":{"main":{"dock":{"type":"tab-area","currentIndex":3,"widgets":["editor:1-move.py","editor:2-infer.py","editor:myapp/config/providers.py","editor:myapp/config/auth.py","editor:myapp/routes/api.py","editor:docker/qrun.sh","editor:myapp/routes/web.py","editor:myapp/Kernel.py"]},"mode":"multiple-document","current":"editor:myapp/config/auth.py"},"left":{"collapsed":false,"current":"running-sessions","widgets":["filebrowser","running-sessions","command-palette","jp-property-inspector","tab-manager","extensionmanager.main-view"]},"right":{"collapsed":true,"widgets":[]}},"file-browser-filebrowser:cwd":{"path":"docker"},"editor:2-infer.py":{"data":{"path":"2-infer.py","factory":"Editor"}},"editor:1-move.py":{"data":{"path":"1-move.py","factory":"Editor"}},"editor:myapp/config/providers.py":{"data":{"path":"myapp/config/providers.py","factory":"Editor"}},"editor:myapp/config/auth.py":{"data":{"path":"myapp/config/auth.py","factory":"Editor"}},"editor:myapp/Kernel.py":{"data":{"path":"myapp/Kernel.py","factory":"Editor"}},"editor:myapp/routes/web.py":{"data":{"path":"myapp/routes/web.py","factory":"Editor"}},"editor:myapp/routes/api.py":{"data":{"path":"myapp/routes/api.py","factory":"Editor"}},"editor:docker/qrun.sh":{"data":{"path":"docker/qrun.sh","factory":"Editor"}}},"metadata":{"id":"/lab/workspaces/auto-m"}}
|
|
@ -0,0 +1 @@
|
|||
{"data":{"layout-restorer:data":{"main":{"dock":{"type":"tab-area","currentIndex":5,"widgets":["editor:1-move.py","editor:2-infer.py","editor:myapp/config/providers.py","editor:myapp/config/auth.py","editor:myapp/routes/api.py","terminal:5","editor:docker/qrun.sh","editor:myapp/routes/web.py","editor:myapp/Kernel.py"]},"mode":"multiple-document","current":"terminal:5"},"left":{"collapsed":false,"current":"filebrowser","widgets":["filebrowser","running-sessions","command-palette","jp-property-inspector","tab-manager","extensionmanager.main-view"]},"right":{"collapsed":true,"widgets":[]}},"file-browser-filebrowser:cwd":{"path":"docker"},"editor:2-infer.py":{"data":{"path":"2-infer.py","factory":"Editor"}},"editor:1-move.py":{"data":{"path":"1-move.py","factory":"Editor"}},"editor:myapp/config/providers.py":{"data":{"path":"myapp/config/providers.py","factory":"Editor"}},"editor:myapp/config/auth.py":{"data":{"path":"myapp/config/auth.py","factory":"Editor"}},"editor:myapp/Kernel.py":{"data":{"path":"myapp/Kernel.py","factory":"Editor"}},"editor:myapp/routes/web.py":{"data":{"path":"myapp/routes/web.py","factory":"Editor"}},"editor:myapp/routes/api.py":{"data":{"path":"myapp/routes/api.py","factory":"Editor"}},"editor:docker/qrun.sh":{"data":{"path":"docker/qrun.sh","factory":"Editor"}},"terminal:5":{"data":{"name":"5"}}},"metadata":{"id":"/lab/workspaces/auto-Q"}}
|
1
.jupyter/migrated
Normal file
1
.jupyter/migrated
Normal file
|
@ -0,0 +1 @@
|
|||
2022-05-11T03:11:38.961576
|
3
.local/share/Trash/info/Untitled Folder.trashinfo
Normal file
3
.local/share/Trash/info/Untitled Folder.trashinfo
Normal file
|
@ -0,0 +1,3 @@
|
|||
[Trash Info]
|
||||
Path=/123/myapp/routes/Untitled%20Folder
|
||||
DeletionDate=2022-06-01T04:13:59
|
3
.local/share/Trash/info/resources 1.trashinfo
Normal file
3
.local/share/Trash/info/resources 1.trashinfo
Normal file
|
@ -0,0 +1,3 @@
|
|||
[Trash Info]
|
||||
Path=/123/myapp/app/resources
|
||||
DeletionDate=2022-06-01T04:12:37
|
3
.local/share/Trash/info/resources.trashinfo
Normal file
3
.local/share/Trash/info/resources.trashinfo
Normal file
|
@ -0,0 +1,3 @@
|
|||
[Trash Info]
|
||||
Path=/123/myapp/app/resources
|
||||
DeletionDate=2022-06-01T04:12:05
|
3
.local/share/Trash/info/untitled 1.txt.trashinfo
Normal file
3
.local/share/Trash/info/untitled 1.txt.trashinfo
Normal file
|
@ -0,0 +1,3 @@
|
|||
[Trash Info]
|
||||
Path=/123/untitled.txt
|
||||
DeletionDate=2023-01-09T00:47:45
|
3
.local/share/Trash/info/untitled.txt.trashinfo
Normal file
3
.local/share/Trash/info/untitled.txt.trashinfo
Normal file
|
@ -0,0 +1,3 @@
|
|||
[Trash Info]
|
||||
Path=/123/untitled.txt
|
||||
DeletionDate=2023-01-09T00:47:37
|
22
.local/share/jupyter/runtime/nbserver-1-open.html
Normal file
22
.local/share/jupyter/runtime/nbserver-1-open.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="refresh" content="1;url=http://0.0.0.0:8888/lab" />
|
||||
<title>Opening Jupyter Notebook</title>
|
||||
<script>
|
||||
setTimeout(function() {
|
||||
window.location.href = "http://0.0.0.0:8888/lab";
|
||||
}, 1000);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>
|
||||
This page should redirect you to Jupyter Notebook. If it doesn't,
|
||||
<a href="http://0.0.0.0:8888/lab">click here to go to Jupyter</a>.
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
12
.local/share/jupyter/runtime/nbserver-1.json
Normal file
12
.local/share/jupyter/runtime/nbserver-1.json
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"base_url": "/",
|
||||
"hostname": "0.0.0.0",
|
||||
"notebook_dir": "/123",
|
||||
"password": true,
|
||||
"pid": 1,
|
||||
"port": 8888,
|
||||
"secure": false,
|
||||
"sock": "",
|
||||
"token": "",
|
||||
"url": "http://0.0.0.0:8888/"
|
||||
}
|
1
.local/share/jupyter/runtime/notebook_cookie_secret
Normal file
1
.local/share/jupyter/runtime/notebook_cookie_secret
Normal file
|
@ -0,0 +1 @@
|
|||
vkkp8m062eSxpTv8GKMXdm8kX7IeFDfFVWzs39i+7GY=
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,2 @@
|
|||
|
||||
8c995c5e3409c2931595a373c086ed8bd7a30bac {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/jupyterlab_tensorboard","integrity":"sha512-U6vB0Zo0ZKPpb4Uc/SRyc+g+KGvuJS6uGbL+0wbR84BTVJ3APKHNlWLmaQGyoo//sBtRFjck6IwG2KLGqSC//A==","time":1652238676475,"size":15624,"metadata":{"time":1652238676470,"url":"https://registry.npmjs.org/jupyterlab_tensorboard","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","content-type":"application/vnd.npm.install-v1+json","date":"Wed, 11 May 2022 03:11:13 GMT","etag":"\"da7906fcbeb79e3a83419495d5ed4ff6\"","last-modified":"Sat, 07 May 2022 01:19:30 GMT","vary":"accept-encoding, accept"}}}
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
c62bd2d038a20e41575732711abe42c4d876c701 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/jupyterlab_tensorboard/-/jupyterlab_tensorboard-0.2.1.tgz","integrity":"sha512-SqBpyv0E2nGvz3s48HvrNukPQ7pCq7+dRhOmZr+lupZkBptKB4ngozMM8l6NN0QXF216CLTJossNzdz4QNshcw==","time":1652238676763,"size":10901,"metadata":{"time":1652238676754,"url":"https://registry.npmjs.org/jupyterlab_tensorboard/-/jupyterlab_tensorboard-0.2.1.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Wed, 11 May 2022 03:11:14 GMT","etag":"\"21d0faf71443a52538e39bc72e0c8231\"","last-modified":"Sat, 27 Jun 2020 13:40:47 GMT","vary":"Accept-Encoding"}}}
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
b3763bb843c295581320d1319e7addcd685704ba {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/jupyterlab-jupytext/-/jupyterlab-jupytext-1.2.3.tgz","integrity":"sha512-LKjEV8c3kb641l0Ik2oOeipo3hkEZo7IDGbq5zbqy2EtJ6zIAtL4GLcwzwXEsxpqGbh0WkpH1rq/3QgwNcrBMQ==","time":1652238676561,"size":5342,"metadata":{"time":1652238676558,"url":"https://registry.npmjs.org/jupyterlab-jupytext/-/jupyterlab-jupytext-1.2.3.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Wed, 11 May 2022 03:11:13 GMT","etag":"\"539610b0f4cc3a127abe58a55c362fbb\"","last-modified":"Wed, 14 Oct 2020 13:47:55 GMT","vary":"Accept-Encoding"}}}
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
ffd469e70d7e98d57eef3215ac34205f40d2e841 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/jupyterlab-jupytext","integrity":"sha512-H8uISq2bjWteupr6fIP9+8vpVdeGxsiHrXLaMOd9cZ6jbHM3/AOlrU73mh01IurgZLuAW98wGic6h2baWyGrWw==","time":1652238676385,"size":34188,"metadata":{"time":1652238676358,"url":"https://registry.npmjs.org/jupyterlab-jupytext","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","content-type":"application/vnd.npm.install-v1+json","date":"Wed, 11 May 2022 03:11:13 GMT","etag":"\"96455b475ba85a33d3d3122d9f0e0f16\"","last-modified":"Sat, 07 May 2022 01:15:09 GMT","vary":"accept-encoding, accept"}}}
|
20
.python_history
Normal file
20
.python_history
Normal file
|
@ -0,0 +1,20 @@
|
|||
import itk
|
||||
parameter_object = itk.ParameterObject.New()
|
||||
import itk
|
||||
parameter_object = itk.ParameterObject.New()
|
||||
import itk
|
||||
itk.version
|
||||
itk.VERSION
|
||||
import itk
|
||||
parameter_object = itk.ParameterObject.New()
|
||||
from registration.best_reg import registration
|
||||
from registration import
|
||||
from registration.best_reg import registration
|
||||
import monai
|
||||
monai
|
||||
dir(monai)
|
||||
monai._version
|
||||
monai._version()
|
||||
monai._version
|
||||
print(monai._version)
|
||||
monai.__version__
|
5
.wget-hsts
Normal file
5
.wget-hsts
Normal file
|
@ -0,0 +1,5 @@
|
|||
# HSTS 1.0 Known Hosts database for GNU Wget.
|
||||
# Edit at your own risk.
|
||||
# <hostname> <port> <incl. subdomains> <created> <max-age>
|
||||
raw.githubusercontent.com 0 0 1691530822 31536000
|
||||
github.com 0 1 1691530822 31536000
|
157
1-move.py
157
1-move.py
|
@ -1,13 +1,19 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import pprint
|
||||
import sys
|
||||
import time
|
||||
|
||||
from pydicom.dataset import Dataset
|
||||
|
||||
from pynetdicom import AE, evt, StoragePresentationContexts, debug_logger
|
||||
from pynetdicom.sop_class import PatientRootQueryRetrieveInformationModelMove
|
||||
from pynetdicom.sop_class import (
|
||||
PatientRootQueryRetrieveInformationModelFind,
|
||||
PatientRootQueryRetrieveInformationModelMove,
|
||||
StudyRootQueryRetrieveInformationModelMove,
|
||||
PatientStudyOnlyQueryRetrieveInformationModelMove,
|
||||
)
|
||||
|
||||
# debug_logger()
|
||||
|
||||
|
@ -16,12 +22,13 @@ Series = {}
|
|||
dcm_dir = '/nn'
|
||||
|
||||
def handle_store(event):
|
||||
# print(event)
|
||||
# print(event)
|
||||
"""Handle a C-STORE request event."""
|
||||
ds = event.dataset
|
||||
ds.file_meta = event.file_meta
|
||||
|
||||
# print(ds.SeriesInstanceUID)
|
||||
# print(ds.SeriesInstanceUID)
|
||||
# print(ds)
|
||||
|
||||
if ds.SeriesInstanceUID in Series:
|
||||
s = Series[ds.SeriesInstanceUID]
|
||||
|
@ -55,13 +62,97 @@ def handle_store(event):
|
|||
# Return a 'Success' status
|
||||
return 0x0000
|
||||
|
||||
# Search in nested Python dict
|
||||
def gen_dict_extract(key, var):
|
||||
if hasattr(var,'items'):
|
||||
for k, v in var.items():
|
||||
if k == key:
|
||||
yield v
|
||||
if isinstance(v, dict):
|
||||
for result in gen_dict_extract(key, v):
|
||||
yield result
|
||||
elif isinstance(v, list):
|
||||
for d in v:
|
||||
for result in gen_dict_extract(key, d):
|
||||
yield result
|
||||
|
||||
|
||||
def FindElement(identifier, element):
|
||||
e = None
|
||||
for v in gen_dict_extract(element, identifier.to_json_dict()):
|
||||
e = v['Value'][0]
|
||||
return e
|
||||
|
||||
def QueryDCM(PatientID):
|
||||
|
||||
handlers = [(evt.EVT_C_STORE, handle_store)]
|
||||
handlers = [
|
||||
(evt.EVT_C_STORE, handle_store),
|
||||
]
|
||||
|
||||
# debug_logger()
|
||||
|
||||
StudyInstanceUID_DICT = {}
|
||||
|
||||
ae = AE()
|
||||
ae.add_requested_context(PatientRootQueryRetrieveInformationModelFind)
|
||||
assoc = ae.associate("192.168.10.56", 104,
|
||||
ae_title = 'IQWEBX',
|
||||
)
|
||||
ds = Dataset()
|
||||
ds.QueryRetrieveLevel = 'PATIENT'
|
||||
ds.PatientID = PatientID
|
||||
responses = assoc.send_c_find(ds, PatientRootQueryRetrieveInformationModelFind)
|
||||
# print(responses)
|
||||
for (status, identifier) in responses:
|
||||
# print(status, identifier)
|
||||
if status:
|
||||
print('C-FIND query status: 0x{0:04X}'.format(status.Status))
|
||||
else:
|
||||
print('Connection timed out, was aborted or received invalid response')
|
||||
|
||||
if identifier:
|
||||
|
||||
# d = {}
|
||||
|
||||
# d['StudyDate' ] = FindElement(identifier, '00080020')
|
||||
# d['ModalitiesInStudy'] = FindElement(identifier, '00080061')
|
||||
# d['StudyInstanceUID' ] = FindElement(identifier, '0020000D')
|
||||
# print(d)
|
||||
|
||||
# if (d['ModalitiesInStudy' ] not in StudyInstanceUID_DICT) or (
|
||||
# d['StudyDate' ] > StudyInstanceUID_DICT[d['ModalitiesInStudy']]['StudyDate']):
|
||||
# StudyInstanceUID_DICT[d['ModalitiesInStudy']] = d
|
||||
|
||||
|
||||
# print(dir(identifier))
|
||||
# print(identifier.keys())
|
||||
|
||||
|
||||
|
||||
for sq in identifier[(0x3109, 0x1035)]:
|
||||
# print(sq)
|
||||
# print(type(sq))
|
||||
# exit()
|
||||
d = {}
|
||||
|
||||
d['StudyDate' ] = FindElement(sq, '00080020')
|
||||
d['ModalitiesInStudy'] = FindElement(sq, '00080061')
|
||||
d['StudyInstanceUID' ] = FindElement(sq, '0020000D')
|
||||
print(d)
|
||||
|
||||
if (d['ModalitiesInStudy' ] not in StudyInstanceUID_DICT) or (
|
||||
d['StudyDate' ] > StudyInstanceUID_DICT[d['ModalitiesInStudy']]['StudyDate']):
|
||||
StudyInstanceUID_DICT[d['ModalitiesInStudy']] = d
|
||||
|
||||
|
||||
assoc.release()
|
||||
pprint.pprint(StudyInstanceUID_DICT)
|
||||
# exit()
|
||||
|
||||
|
||||
|
||||
# Initialise the Application Entity
|
||||
ae = AE()
|
||||
|
||||
# Add a requested presentation context
|
||||
ae.add_requested_context(PatientRootQueryRetrieveInformationModelMove)
|
||||
|
||||
|
@ -73,34 +164,40 @@ def QueryDCM(PatientID):
|
|||
# scp = ae.start_server(("127.0.0.1", 11120), block=False, evt_handlers=handlers)
|
||||
scp = ae.start_server(("0.0.0.0", 11120), block=False, evt_handlers=handlers)
|
||||
|
||||
# Create out identifier (query) dataset
|
||||
ds = Dataset()
|
||||
ds.QueryRetrieveLevel = 'PATIENT'
|
||||
ds.PatientID = PatientID
|
||||
for ModalitiesInStudy, d in StudyInstanceUID_DICT.items():
|
||||
StudyInstanceUID = d['StudyInstanceUID']
|
||||
|
||||
# Create out identifier (query) dataset
|
||||
ds = Dataset()
|
||||
# ds.QueryRetrieveLevel = 'PATIENT'
|
||||
# ds.PatientID = PatientID
|
||||
ds.QueryRetrieveLevel = 'STUDY'
|
||||
ds.StudyInstanceUID = StudyInstanceUID
|
||||
|
||||
|
||||
# Associate with peer AE at IP 127.0.0.1 and port 11112
|
||||
# assoc = ae.associate("127.0.0.1", 11112)
|
||||
assoc = ae.associate("192.168.10.56", 104,
|
||||
ae_title = 'IQWEBX',
|
||||
)
|
||||
|
||||
if assoc.is_established:
|
||||
|
||||
# Use the C-MOVE service to send the identifier
|
||||
responses = assoc.send_c_move(ds, 'OUR_STORE_SCP', PatientRootQueryRetrieveInformationModelMove)
|
||||
|
||||
# Associate with peer AE at IP 127.0.0.1 and port 11112
|
||||
# assoc = ae.associate("127.0.0.1", 11112)
|
||||
assoc = ae.associate("192.168.10.56", 104,
|
||||
ae_title = 'IQWEBX',
|
||||
)
|
||||
# print(responses)
|
||||
for (status, identifier) in responses:
|
||||
# print(status, identifier)
|
||||
if status:
|
||||
print('C-MOVE query status: 0x{0:04x}'.format(status.Status))
|
||||
else:
|
||||
print('Connection timed out, was aborted or received invalid response')
|
||||
|
||||
|
||||
if assoc.is_established:
|
||||
# Use the C-MOVE service to send the identifier
|
||||
responses = assoc.send_c_move(ds, 'OUR_STORE_SCP', PatientRootQueryRetrieveInformationModelMove)
|
||||
|
||||
for (status, identifier) in responses:
|
||||
# print(status, identifier)
|
||||
if status:
|
||||
print('C-MOVE query status: 0x{0:04x}'.format(status.Status))
|
||||
else:
|
||||
print('Connection timed out, was aborted or received invalid response')
|
||||
|
||||
# Release the association
|
||||
assoc.release()
|
||||
else:
|
||||
print('Association rejected, aborted or never connected')
|
||||
# Release the association
|
||||
assoc.release()
|
||||
else:
|
||||
print('Association rejected, aborted or never connected')
|
||||
|
||||
# Stop our Storage SCP
|
||||
scp.shutdown()
|
||||
|
|
130
2-infer.py
130
2-infer.py
|
@ -1,5 +1,26 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
'''
|
||||
2d 0.4610997436727624
|
||||
3d_fullres 0.5022740762294419
|
||||
3d_lowres 0.5957028945994233
|
||||
3d_cascade_fullres 0.517286480153028
|
||||
ensemble_2d__nnUNetTrainerV2__nnUNetPlansv2.1--3d_fullres__nnUNetTrainerV2__nnUNetPlansv2.1 0.5243185547220239
|
||||
ensemble_2d__nnUNetTrainerV2__nnUNetPlansv2.1--3d_lowres__nnUNetTrainerV2__nnUNetPlansv2.1 0.552552255340162
|
||||
ensemble_2d__nnUNetTrainerV2__nnUNetPlansv2.1--3d_cascade_fullres__nnUNetTrainerV2CascadeFullRes__nnUNetPlansv2.1 0.531701751318307
|
||||
ensemble_3d_fullres__nnUNetTrainerV2__nnUNetPlansv2.1--3d_lowres__nnUNetTrainerV2__nnUNetPlansv2.1 0.6105215496684026
|
||||
ensemble_3d_fullres__nnUNetTrainerV2__nnUNetPlansv2.1--3d_cascade_fullres__nnUNetTrainerV2CascadeFullRes__nnUNetPlansv2.1 0.5343679184080806
|
||||
ensemble_3d_lowres__nnUNetTrainerV2__nnUNetPlansv2.1--3d_cascade_fullres__nnUNetTrainerV2CascadeFullRes__nnUNetPlansv2.1 0.6000630104223947
|
||||
Task222_ICTS2022 submit model ensemble_3d_fullres__nnUNetTrainerV2__nnUNetPlansv2.1--3d_lowres__nnUNetTrainerV2__nnUNetPlansv2.1 0.6105215496684026
|
||||
|
||||
Here is how you should predict test cases. Run in sequential order and replace all input and output folder names with your personalized ones
|
||||
|
||||
nnUNet_predict -i FOLDER_WITH_TEST_CASES -o OUTPUT_FOLDER_MODEL1 -tr nnUNetTrainerV2 -ctr nnUNetTrainerV2CascadeFullRes -m 3d_fullres -p nnUNetPlansv2.1 -t Task222_ICTS2022
|
||||
nnUNet_predict -i FOLDER_WITH_TEST_CASES -o OUTPUT_FOLDER_MODEL2 -tr nnUNetTrainerV2 -ctr nnUNetTrainerV2CascadeFullRes -m 3d_lowres -p nnUNetPlansv2.1 -t Task222_ICTS2022
|
||||
nnUNet_ensemble -f OUTPUT_FOLDER_MODEL1 OUTPUT_FOLDER_MODEL2 -o OUTPUT_FOLDER -pp /workspace/nnUNet_trained_models/nnUNet/ensembles/Task222_ICTS2022/ensemble_3d_fullres__nnUNetTrainerV2__nnUNetPlansv2.1--3d_lowres__nnUNetTrainerV2__nnUNetPlansv2.1/postprocessing.json
|
||||
'''
|
||||
|
||||
|
||||
import difflib
|
||||
import os
|
||||
import shutil
|
||||
|
@ -8,14 +29,16 @@ import sys
|
|||
import time
|
||||
|
||||
from nipype.interfaces.dcm2nii import Dcm2niix
|
||||
from pydicom import dcmread
|
||||
from pynetdicom import AE, debug_logger
|
||||
from pynetdicom.sop_class import CTImageStorage, RTStructureSetStorage
|
||||
from rt_utils import RTStructBuilder
|
||||
|
||||
import numpy as np
|
||||
import SimpleITK as sitk
|
||||
|
||||
|
||||
import itk_elastix
|
||||
|
||||
# import itk_elastix
|
||||
from registration.best_reg import reg_transform
|
||||
|
||||
def dcm2nii(source_dir, output_dir):
|
||||
|
||||
|
@ -30,13 +53,17 @@ def dcm2nii(source_dir, output_dir):
|
|||
converter.run()
|
||||
|
||||
|
||||
def register(DCM_CT, DCM_MR):
|
||||
def inference(DCM_CT, DCM_MR):
|
||||
|
||||
matcher = difflib.SequenceMatcher(a=DCM_CT, b=DCM_MR)
|
||||
match = matcher.find_longest_match(0, len(matcher.a), 0, len(matcher.b))
|
||||
ROOT_DIR = DCM_CT[:match.size]
|
||||
NII_DIR = os.path.join(ROOT_DIR, 'nii')
|
||||
INPUT_DIR = os.path.join(ROOT_DIR, 'input')
|
||||
|
||||
OUTPUT_3d_fullres = os.path.join(ROOT_DIR, '3d_fullres')
|
||||
OUTPUT_3d_lowres = os.path.join(ROOT_DIR, '3d_lowres')
|
||||
|
||||
OUTPUT_DIR = os.path.join(ROOT_DIR, 'output')
|
||||
|
||||
head, tail = os.path.split(DCM_CT)
|
||||
|
@ -46,6 +73,8 @@ def register(DCM_CT, DCM_MR):
|
|||
os.makedirs(NII_DIR)
|
||||
shutil.rmtree(INPUT_DIR, ignore_errors=True)
|
||||
os.makedirs(INPUT_DIR)
|
||||
shutil.rmtree(OUTPUT_3d_fullres, ignore_errors=True)
|
||||
shutil.rmtree(OUTPUT_3d_lowres, ignore_errors=True)
|
||||
shutil.rmtree(OUTPUT_DIR, ignore_errors=True)
|
||||
# os.makedirs(OUTPUT_DIR)
|
||||
|
||||
|
@ -80,6 +109,7 @@ def register(DCM_CT, DCM_MR):
|
|||
print(NII_CT, NII_MR, input_file)
|
||||
|
||||
# nnUNet_predict -i INPUT_FOLDER -o OUTPUT_FOLDER -t 222 -m 3d_lowres --save_npz
|
||||
'''
|
||||
subprocess.run(["nnUNet_predict",
|
||||
"-i", INPUT_DIR,
|
||||
"-o", OUTPUT_DIR,
|
||||
|
@ -87,11 +117,56 @@ def register(DCM_CT, DCM_MR):
|
|||
"-m", "3d_lowres",
|
||||
"--save_npz",
|
||||
])
|
||||
'''
|
||||
|
||||
|
||||
# nnUNet_predict -i FOLDER_WITH_TEST_CASES -o OUTPUT_FOLDER_MODEL1 -tr nnUNetTrainerV2 -ctr nnUNetTrainerV2CascadeFullRes -m 3d_fullres -p nnUNetPlansv2.1 -t Task222_ICTS2022
|
||||
# nnUNet_predict -i FOLDER_WITH_TEST_CASES -o OUTPUT_FOLDER_MODEL2 -tr nnUNetTrainerV2 -ctr nnUNetTrainerV2CascadeFullRes -m 3d_lowres -p nnUNetPlansv2.1 -t Task222_ICTS2022
|
||||
# nnUNet_ensemble -f OUTPUT_FOLDER_MODEL1 OUTPUT_FOLDER_MODEL2 -o OUTPUT_FOLDER -pp /workspace/nnUNet_trained_models/nnUNet/ensembles/Task222_ICTS2022/ensemble_3d_fullres__nnUNetTrainerV2__nnUNetPlansv2.1--3d_lowres__nnUNetTrainerV2__nnUNetPlansv2.1/postprocessing.json
|
||||
|
||||
|
||||
subprocess.run(["nnUNet_predict",
|
||||
"-i", INPUT_DIR,
|
||||
"-o", OUTPUT_3d_fullres,
|
||||
"-tr", "nnUNetTrainerV2",
|
||||
"-ctr", "nnUNetTrainerV2CascadeFullRes",
|
||||
"-m", "3d_fullres",
|
||||
"-p", "nnUNetPlansv2.1",
|
||||
"-t", "Task222_ICTS2022",
|
||||
"--save_npz",
|
||||
])
|
||||
|
||||
subprocess.run(["nnUNet_predict",
|
||||
"-i", INPUT_DIR,
|
||||
"-o", OUTPUT_3d_lowres,
|
||||
"-tr", "nnUNetTrainerV2",
|
||||
"-ctr", "nnUNetTrainerV2CascadeFullRes",
|
||||
"-m", "3d_lowres",
|
||||
"-p", "nnUNetPlansv2.1",
|
||||
"-t", "Task222_ICTS2022",
|
||||
"--save_npz",
|
||||
])
|
||||
|
||||
a = ["nnUNet_ensemble",
|
||||
"-f", OUTPUT_3d_fullres, OUTPUT_3d_lowres,
|
||||
"-o", OUTPUT_DIR,
|
||||
"-pp", "/workspace/nnUNet_trained_models/nnUNet/ensembles/Task222_ICTS2022/ensemble_3d_fullres__nnUNetTrainerV2__nnUNetPlansv2.1--3d_lowres__nnUNetTrainerV2__nnUNetPlansv2.1/postprocessing.json",
|
||||
]
|
||||
|
||||
print (' '.join(a))
|
||||
|
||||
subprocess.run(["nnUNet_ensemble",
|
||||
"-f", OUTPUT_3d_fullres, OUTPUT_3d_lowres,
|
||||
"-o", OUTPUT_DIR,
|
||||
"-pp", "/workspace/nnUNet_trained_models/nnUNet/ensembles/Task222_ICTS2022/ensemble_3d_fullres__nnUNetTrainerV2__nnUNetPlansv2.1--3d_lowres__nnUNetTrainerV2__nnUNetPlansv2.1/postprocessing.json",
|
||||
])
|
||||
|
||||
print(output_file)
|
||||
|
||||
r2 = itk_elastix.register(NII_CT, NII_MR)
|
||||
itk_elastix.transform_write(output_file, r2['fwdtransforms'], label_file, is_label=True)
|
||||
# r2 = itk_elastix.register(NII_CT, NII_MR)
|
||||
# itk_elastix.transform_write(output_file, r2['fwdtransforms'], label_file, is_label=True)
|
||||
|
||||
reg_transform(NII_CT, NII_MR, output_file, label_file)
|
||||
|
||||
reader = sitk.ImageSeriesReader()
|
||||
dicom_names = reader.GetGDCMSeriesFileNames(DCM_CT)
|
||||
|
@ -126,8 +201,48 @@ def register(DCM_CT, DCM_MR):
|
|||
|
||||
print(rtss_file)
|
||||
rtstruct.save(rtss_file)
|
||||
|
||||
return rtss_file
|
||||
|
||||
|
||||
# incorporate send_c_store
|
||||
|
||||
def SendDCM(fp):
|
||||
debug_logger()
|
||||
|
||||
# Initialise the Application Entity
|
||||
ae = AE()
|
||||
ae.ae_title = 'OUR_STORE_SCP'
|
||||
|
||||
# Add a requested presentation context
|
||||
# ae.add_requested_context(CTImageStorage)
|
||||
ae.add_requested_context(RTStructureSetStorage)
|
||||
|
||||
# Read in our DICOM CT dataset
|
||||
ds = dcmread(fp)
|
||||
|
||||
# Associate with peer AE at IP 127.0.0.1 and port 11112
|
||||
assoc = ae.associate("127.0.0.1", 11112)
|
||||
assoc = ae.associate("172.16.40.36", 104,
|
||||
ae_title = 'N1000_STORAGE',
|
||||
)
|
||||
if assoc.is_established:
|
||||
# Use the C-STORE service to send the dataset
|
||||
# returns the response status as a pydicom Dataset
|
||||
status = assoc.send_c_store(ds)
|
||||
|
||||
# Check the status of the storage request
|
||||
if status:
|
||||
# If the storage request succeeded this will be 0x0000
|
||||
print('C-STORE request status: 0x{0:04x}'.format(status.Status))
|
||||
else:
|
||||
print('Connection timed out, was aborted or received invalid response')
|
||||
|
||||
# Release the association
|
||||
assoc.release()
|
||||
else:
|
||||
print('Association rejected, aborted or never connected')
|
||||
|
||||
|
||||
def main():
|
||||
if len(sys.argv) < 2:
|
||||
|
@ -138,7 +253,8 @@ def main():
|
|||
print(sys.argv[1])
|
||||
|
||||
start = time.time()
|
||||
register(sys.argv[1], sys.argv[2])
|
||||
rtss_file = inference(sys.argv[1], sys.argv[2])
|
||||
SendDCM(rtss_file)
|
||||
end = time.time()
|
||||
print(end - start, 'seconds')
|
||||
|
||||
|
|
BIN
6jj_lths.mat
Normal file
BIN
6jj_lths.mat
Normal file
Binary file not shown.
52
adding.py
Normal file
52
adding.py
Normal file
|
@ -0,0 +1,52 @@
|
|||
from rt_utils import RTStructBuilder
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
# Load existing RT Struct. Requires the series path and existing RT Struct path
|
||||
|
||||
|
||||
dicom_series_path = "/nn/6768700/20230106/CT/9/"
|
||||
rt_struct_list = [
|
||||
"/nn/6768700/20230106/CT/9-rtss.dcm",
|
||||
"/nn/6768700/20230106/CT/DCM_1.2.840.114358.189250942524258.20230106112102.643186932766_230109075302/rtss~3~a2381ecc-4b94-40cc-a7aa-41968c54e206.dcm",
|
||||
]
|
||||
|
||||
rtstruct = RTStructBuilder.create_new(dicom_series_path=dicom_series_path)
|
||||
|
||||
for rt_struct_path in rt_struct_list:
|
||||
r = RTStructBuilder.create_from(
|
||||
dicom_series_path=dicom_series_path,
|
||||
rt_struct_path=rt_struct_path,
|
||||
)
|
||||
for name in r.get_roi_names():
|
||||
mask_3d = r.get_roi_mask_by_name(name)
|
||||
rtstruct.add_roi(
|
||||
mask=mask_3d,
|
||||
name=name,
|
||||
)
|
||||
print(name)
|
||||
|
||||
rtstruct.save('/nn/6768700/20230106/CT/new-rt-struct.dcm')
|
||||
exit()
|
||||
|
||||
#Large
|
||||
rtstruct1 = RTStructBuilder.create_from(
|
||||
dicom_series_path="/nn/6768700/20230106/CT/9/",
|
||||
rt_struct_path="/nn/6768700/20230106/CT/9-rtss.dcm"
|
||||
)
|
||||
|
||||
#Small
|
||||
rtstruct2 = RTStructBuilder.create_from(
|
||||
dicom_series_path="/nn/6768700/20230106/CT/9/",
|
||||
rt_struct_path="/nn/6768700/20230106/CT/DCM_1.2.840.114358.189250942524258.20230106112102.643186932766_230109075302/rtss~3~a2381ecc-4b94-40cc-a7aa-41968c54e206.dcm"
|
||||
)
|
||||
|
||||
# print(dir(rtstruct2))
|
||||
|
||||
for name in rtstruct2.get_roi_names():
|
||||
mask_3d = rtstruct2.get_roi_mask_by_name(name)
|
||||
rtstruct1.add_roi(
|
||||
mask=mask_3d,
|
||||
name=name,
|
||||
)
|
||||
print(name)
|
||||
|
BIN
bcngawwk.mat
Normal file
BIN
bcngawwk.mat
Normal file
Binary file not shown.
33
dev/register_rtss.py
Executable file
33
dev/register_rtss.py
Executable file
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
|
||||
from pydicom import dcmread
|
||||
|
||||
|
||||
RTSS = '/Patient/RTSS/66351478_struct_set_2022-10-03_10-00-35.dcm'
|
||||
ReferenceRoot = '/nn/6635147/20220930/MR'
|
||||
|
||||
|
||||
ds = dcmread(RTSS)
|
||||
|
||||
print(ds)
|
||||
exit()
|
||||
|
||||
# print(ds['Frame of Reference UID'])
|
||||
# print(dir(ds))
|
||||
|
||||
FrameOfReferenceUID = ds.FrameOfReferenceUID
|
||||
print(FrameOfReferenceUID)
|
||||
|
||||
for root, dirs, files in os.walk(ReferenceRoot):
|
||||
for name in files:
|
||||
dcm = os.path.join(root, name)
|
||||
print(dcm)
|
||||
ds = dcmread(dcm)
|
||||
break
|
||||
|
||||
print(ds.SeriesInstanceUID)
|
||||
# break
|
||||
|
||||
|
|
@ -6,10 +6,16 @@ RUN apt-get update -y \
|
|||
|
||||
# pip
|
||||
# RUN pip install antspyx itk-elastix nipype nnunet rt_utils
|
||||
RUN pip install antspyx itk-elastix nnunet # too large .... install first
|
||||
RUN pip install antspyx nipype nnunet # too large .... install first
|
||||
RUN pip install itk-elastix==0.13.0
|
||||
RUN pip install --upgrade git+https://github.com/FabianIsensee/hiddenlayer.git@more_plotted_details#egg=hiddenlayer
|
||||
RUN pip install git+https://github.com/qurit/rt-utils.git@5bab9ffcc8fe19dd775e940afdc3d8f48f869150 # fix FrameOfReferenceUID
|
||||
RUN pip install masonite nipype
|
||||
|
||||
|
||||
# WORKDIR /workspace
|
||||
WORKDIR /123
|
||||
COPY requirements.txt /123
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
# nnUNet
|
||||
|
||||
|
@ -24,12 +30,12 @@ ENV RESULTS_FOLDER="/workspace/nnUNet_trained_models"
|
|||
#ENTRYPOINT service ssh restart && env >> /etc/environment && bash
|
||||
#EXPOSE 22
|
||||
|
||||
# Masonite
|
||||
EXPOSE 8000
|
||||
|
||||
# jupyter
|
||||
ENTRYPOINT jupyter-lab
|
||||
EXPOSE 8888
|
||||
|
||||
# pynetdicom
|
||||
EXPOSE 11120
|
||||
|
||||
# WORKDIR /workspace
|
||||
WORKDIR /123
|
||||
|
|
|
@ -4,11 +4,20 @@
|
|||
export dockerImage=123:v0
|
||||
|
||||
#docker run --gpus all --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 -it --rm -v $DIR:/workspace $dockerImage /bin/bash
|
||||
GPU=nvidia0 gpu-docker run --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 -it --rm \
|
||||
# GPU=nvidia0 gpu-docker run --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 -it --rm \
|
||||
#GPU=nvidia0 gpu-docker run --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 \
|
||||
docker run --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 \
|
||||
--name 123 \
|
||||
-v /share/WORKSPACE/nnUNet:/workspace \
|
||||
-v /share/Public/git/123:/123 \
|
||||
-v /share/Public/git/123:/root \
|
||||
-v /share/Public/nn:/nn \
|
||||
-p 11120:11120 \
|
||||
-v /share/Public/Patient:/Patient \
|
||||
-p 8000:8000 \
|
||||
-p 8888:8888 \
|
||||
-p 11120:11120 \
|
||||
$dockerImage &
|
||||
|
||||
|
||||
# Then recreate, adding GPU in runtime
|
||||
|
||||
|
|
2
docker/requirements.txt
Normal file
2
docker/requirements.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
masonite>=4.0,<5.0
|
||||
masonite-orm>=2.0,<3.0
|
51
myapp/.env-example
Normal file
51
myapp/.env-example
Normal file
|
@ -0,0 +1,51 @@
|
|||
APP_DEBUG=True
|
||||
APP_ENV=local
|
||||
APP_KEY=kdFqv3GDtbgryi-1RAtMDwFa80WQuDPwYcFDie4r9zs=
|
||||
APP_URL=http://localhost:8000
|
||||
HASHING_FUNCTION=bcrypt
|
||||
MIX_BASE_URL=
|
||||
|
||||
MAIL_DRIVER=terminal
|
||||
MAIL_FROM=
|
||||
MAIL_HOST=
|
||||
MAIL_PORT=
|
||||
MAIL_USERNAME=
|
||||
MAIL_PASSWORD=
|
||||
|
||||
MAILGUN_DOMAIN=
|
||||
MAILGUN_SECRET=
|
||||
|
||||
DB_CONNECTION=sqlite
|
||||
SQLITE_DB_DATABASE=masonite.sqlite3
|
||||
DB_HOST=127.0.0.1
|
||||
DB_USERNAME=root
|
||||
DB_PASSWORD=root
|
||||
DB_DATABASE=masonite
|
||||
DB_PORT=3306
|
||||
DB_LOG=True
|
||||
|
||||
S3_CLIENT=
|
||||
S3_SECRET=
|
||||
S3_BUCKET=
|
||||
|
||||
JWT_SECRET=
|
||||
|
||||
QUEUE_DRIVER=async
|
||||
QUEUE_USERNAME=
|
||||
QUEUE_VHOST=
|
||||
QUEUE_PASSWORD=
|
||||
QUEUE_HOST=
|
||||
QUEUE_PORT=
|
||||
QUEUE_CHANNEL=
|
||||
|
||||
SLACK_TOKEN=
|
||||
SLACK_WEBHOOK=
|
||||
|
||||
VONAGE_KEY=
|
||||
VONAGE_SECRET=
|
||||
VONAGE_SMS_FROM=
|
||||
|
||||
PUSHER_CLIENT=
|
||||
PUSHER_APP_ID=
|
||||
PUSHER_SECRET=
|
||||
PUSHER_CLUSTER=
|
2
myapp/.env.testing
Normal file
2
myapp/.env.testing
Normal file
|
@ -0,0 +1,2 @@
|
|||
DB_CONNECTION=sqlite
|
||||
DB_LOG=True
|
18
myapp/.gitignore
vendored
Normal file
18
myapp/.gitignore
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
# python
|
||||
*.pyc
|
||||
*__pycache__
|
||||
.pytest_cache
|
||||
venv
|
||||
# environment
|
||||
.env
|
||||
.env.*
|
||||
!.env.testing
|
||||
# npm
|
||||
node_modules
|
||||
package-lock.json
|
||||
|
||||
.vscode
|
||||
**/*.DS_Store
|
||||
|
||||
# compiled assets
|
||||
storage/compiled
|
117
myapp/Kernel.py
Normal file
117
myapp/Kernel.py
Normal file
|
@ -0,0 +1,117 @@
|
|||
from masonite.foundation import response_handler
|
||||
from masonite.storage import StorageCapsule
|
||||
from masonite.auth import Sign
|
||||
from masonite.environment import LoadEnvironment
|
||||
from masonite.utils.structures import load
|
||||
from masonite.utils.location import base_path
|
||||
from masonite.middleware import (
|
||||
SessionMiddleware,
|
||||
EncryptCookies,
|
||||
LoadUserMiddleware,
|
||||
MaintenanceModeMiddleware,
|
||||
)
|
||||
from masonite.routes import Route
|
||||
from masonite.configuration.Configuration import Configuration
|
||||
from masonite.configuration import config
|
||||
|
||||
from app.middlewares import VerifyCsrfToken, AuthenticationMiddleware
|
||||
from masonite.api.middleware import JWTAuthenticationMiddleware
|
||||
|
||||
class Kernel:
|
||||
|
||||
http_middleware = [MaintenanceModeMiddleware, EncryptCookies]
|
||||
|
||||
route_middleware = {
|
||||
"web": [SessionMiddleware, LoadUserMiddleware, VerifyCsrfToken],
|
||||
"auth": [AuthenticationMiddleware],
|
||||
|
||||
# ..
|
||||
"api": [
|
||||
JWTAuthenticationMiddleware
|
||||
],
|
||||
|
||||
}
|
||||
|
||||
def __init__(self, app):
|
||||
self.application = app
|
||||
|
||||
def register(self):
|
||||
# Register routes
|
||||
self.load_environment()
|
||||
self.register_configurations()
|
||||
self.register_middleware()
|
||||
self.register_routes()
|
||||
self.register_database()
|
||||
self.register_templates()
|
||||
self.register_storage()
|
||||
|
||||
def load_environment(self):
|
||||
LoadEnvironment()
|
||||
|
||||
def register_configurations(self):
|
||||
# load configuration
|
||||
self.application.bind("config.location", "config")
|
||||
configuration = Configuration(self.application)
|
||||
configuration.load()
|
||||
self.application.bind("config", configuration)
|
||||
key = config("application.key")
|
||||
self.application.bind("key", key)
|
||||
self.application.bind("sign", Sign(key))
|
||||
# set locations
|
||||
self.application.bind("resources.location", "resources/")
|
||||
self.application.bind("controllers.location", "app/controllers")
|
||||
self.application.bind("jobs.location", "app/jobs")
|
||||
self.application.bind("providers.location", "app/providers")
|
||||
self.application.bind("mailables.location", "app/mailables")
|
||||
self.application.bind("listeners.location", "app/listeners")
|
||||
self.application.bind("validation.location", "app/validation")
|
||||
self.application.bind("notifications.location", "app/notifications")
|
||||
self.application.bind("events.location", "app/events")
|
||||
self.application.bind("tasks.location", "app/tasks")
|
||||
self.application.bind("models.location", "app/models")
|
||||
self.application.bind("observers.location", "app/models/observers")
|
||||
self.application.bind("policies.location", "app/policies")
|
||||
self.application.bind("commands.location", "app/commands")
|
||||
self.application.bind("middlewares.location", "app/middlewares")
|
||||
|
||||
self.application.bind("server.runner", "masonite.commands.ServeCommand.main")
|
||||
|
||||
def register_middleware(self):
|
||||
self.application.make("middleware").add(self.route_middleware).add(self.http_middleware)
|
||||
|
||||
def register_routes(self):
|
||||
Route.set_controller_locations(self.application.make("controllers.location"))
|
||||
self.application.bind("routes.location", "routes/web")
|
||||
self.application.make("router").add(
|
||||
Route.group(
|
||||
load(self.application.make("routes.location"), "ROUTES"), middleware=["web"]
|
||||
)
|
||||
)
|
||||
#API Development
|
||||
self.application.bind("routes.api.location", "routes/api")
|
||||
|
||||
|
||||
|
||||
def register_database(self):
|
||||
from masoniteorm.query import QueryBuilder
|
||||
|
||||
self.application.bind(
|
||||
"builder",
|
||||
QueryBuilder(connection_details=config("database.databases")),
|
||||
)
|
||||
|
||||
self.application.bind("migrations.location", "databases/migrations")
|
||||
self.application.bind("seeds.location", "databases/seeds")
|
||||
|
||||
self.application.bind("resolver", config("database.db"))
|
||||
|
||||
def register_templates(self):
|
||||
self.application.bind("views.location", "templates/")
|
||||
|
||||
def register_storage(self):
|
||||
storage = StorageCapsule()
|
||||
storage.add_storage_assets(config("filesystem.staticfiles"))
|
||||
self.application.bind("storage_capsule", storage)
|
||||
|
||||
self.application.set_response_handler(response_handler)
|
||||
self.application.use_storage_path(base_path("storage"))
|
0
myapp/app/__init__.py
Normal file
0
myapp/app/__init__.py
Normal file
7
myapp/app/controllers/BlogController.py
Normal file
7
myapp/app/controllers/BlogController.py
Normal file
|
@ -0,0 +1,7 @@
|
|||
from masonite.controllers import Controller
|
||||
from masonite.views import View
|
||||
|
||||
|
||||
class BlogController(Controller):
|
||||
def show(self, view: View):
|
||||
return view.render("blog")
|
11
myapp/app/controllers/PatientController.py
Normal file
11
myapp/app/controllers/PatientController.py
Normal file
|
@ -0,0 +1,11 @@
|
|||
from masonite.controllers import Controller
|
||||
from masonite.views import View
|
||||
|
||||
|
||||
class PatientController(Controller):
|
||||
def show(self, view: View):
|
||||
return view.render("patient.html")
|
||||
|
||||
def move(self, view: View):
|
||||
return view.render("patient.html")
|
||||
|
10
myapp/app/controllers/WelcomeController.py
Normal file
10
myapp/app/controllers/WelcomeController.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
"""A WelcomeController Module."""
|
||||
from masonite.views import View
|
||||
from masonite.controllers import Controller
|
||||
|
||||
|
||||
class WelcomeController(Controller):
|
||||
"""WelcomeController Controller Class."""
|
||||
|
||||
def show(self, view: View):
|
||||
return view.render("welcome")
|
0
myapp/app/controllers/__init__.py
Normal file
0
myapp/app/controllers/__init__.py
Normal file
19
myapp/app/controllers/api/UsersController.py
Normal file
19
myapp/app/controllers/api/UsersController.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
from masonite.controllers import Controller
|
||||
from masonite.views import View
|
||||
|
||||
|
||||
class UsersController(Controller):
|
||||
def index(self, view: View):
|
||||
return view.render("")
|
||||
|
||||
def show(self, view: View):
|
||||
return view.render("")
|
||||
|
||||
def store(self, view: View):
|
||||
return view.render("")
|
||||
|
||||
def update(self, view: View):
|
||||
return view.render("")
|
||||
|
||||
def destroy(self, view: View):
|
||||
return view.render("")
|
13
myapp/app/middlewares/AuthenticationMiddleware.py
Normal file
13
myapp/app/middlewares/AuthenticationMiddleware.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
from masonite.middleware import Middleware
|
||||
|
||||
|
||||
class AuthenticationMiddleware(Middleware):
|
||||
"""Middleware to check if the user is logged in."""
|
||||
|
||||
def before(self, request, response):
|
||||
if not request.user():
|
||||
return response.redirect(name="login")
|
||||
return request
|
||||
|
||||
def after(self, request, response):
|
||||
return request
|
6
myapp/app/middlewares/VerifyCsrfToken.py
Normal file
6
myapp/app/middlewares/VerifyCsrfToken.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
from masonite.middleware import VerifyCsrfToken as Middleware
|
||||
|
||||
|
||||
class VerifyCsrfToken(Middleware):
|
||||
|
||||
exempt = []
|
3
myapp/app/middlewares/__init__.py
Normal file
3
myapp/app/middlewares/__init__.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
# flake8: noqa: F401
|
||||
from .VerifyCsrfToken import VerifyCsrfToken
|
||||
from .AuthenticationMiddleware import AuthenticationMiddleware
|
12
myapp/app/models/User.py
Normal file
12
myapp/app/models/User.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
"""User Model."""
|
||||
from masoniteorm.models import Model
|
||||
from masoniteorm.scopes import SoftDeletesMixin
|
||||
from masonite.authentication import Authenticates
|
||||
|
||||
|
||||
class User(Model, SoftDeletesMixin, Authenticates):
|
||||
"""User Model."""
|
||||
|
||||
__fillable__ = ["name", "email", "password"]
|
||||
__hidden__ = ["password"]
|
||||
__auth__ = "email"
|
12
myapp/app/providers/AppProvider.py
Normal file
12
myapp/app/providers/AppProvider.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
from masonite.providers import Provider
|
||||
|
||||
|
||||
class AppProvider(Provider):
|
||||
def __init__(self, application):
|
||||
self.application = application
|
||||
|
||||
def register(self):
|
||||
pass
|
||||
|
||||
def boot(self):
|
||||
pass
|
2
myapp/app/providers/__init__.py
Normal file
2
myapp/app/providers/__init__.py
Normal file
|
@ -0,0 +1,2 @@
|
|||
# flake8: noqa: F401
|
||||
from .AppProvider import AppProvider
|
0
myapp/config/__init__.py
Normal file
0
myapp/config/__init__.py
Normal file
15
myapp/config/api.py
Normal file
15
myapp/config/api.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
"""API Config"""
|
||||
from masonite.environment import env
|
||||
|
||||
from app.models.User import User
|
||||
|
||||
DRIVERS = {
|
||||
"jwt": {
|
||||
"algorithm": "HS512",
|
||||
"secret": env("JWT_SECRET"),
|
||||
"model": User,
|
||||
"expires": None,
|
||||
"authenticates": False,
|
||||
"version": None,
|
||||
}
|
||||
}
|
16
myapp/config/application.py
Normal file
16
myapp/config/application.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
from masonite.environment import env
|
||||
|
||||
|
||||
KEY = env("APP_KEY", "-RkDOqXojJIlsF_I8wWiUq_KRZ0PtGWTOZ676u5HtLg=")
|
||||
|
||||
DEBUG = env("APP_DEBUG", True)
|
||||
|
||||
HASHING = {
|
||||
"default": env("HASHING_FUNCTION", "bcrypt"),
|
||||
"bcrypt": {"rounds": 10},
|
||||
"argon2": {"memory": 1024, "threads": 2, "time": 2},
|
||||
}
|
||||
|
||||
APP_URL = env("APP_URL", "http://localhost:8000/")
|
||||
|
||||
MIX_BASE_URL = env("MIX_BASE_URL", None)
|
8
myapp/config/auth.py
Normal file
8
myapp/config/auth.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
from app.models.User import User
|
||||
|
||||
GUARDS = {
|
||||
"default": "web",
|
||||
"web": {"model": User},
|
||||
"password_reset_table": "password_resets",
|
||||
"password_reset_expiration": 1440, # in minutes. 24 hours. None if disabled
|
||||
}
|
14
myapp/config/broadcast.py
Normal file
14
myapp/config/broadcast.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
from masonite.environment import env
|
||||
|
||||
|
||||
BROADCASTS = {
|
||||
"default": "pusher",
|
||||
"pusher": {
|
||||
"driver": "pusher",
|
||||
"client": env("PUSHER_CLIENT"),
|
||||
"app_id": env("PUSHER_APP_ID"),
|
||||
"secret": env("PUSHER_SECRET"),
|
||||
"cluster": env("PUSHER_CLUSTER"),
|
||||
"ssl": False,
|
||||
},
|
||||
}
|
25
myapp/config/cache.py
Normal file
25
myapp/config/cache.py
Normal file
|
@ -0,0 +1,25 @@
|
|||
# from masonite.environment import env
|
||||
|
||||
|
||||
STORES = {
|
||||
"default": "local",
|
||||
"local": {
|
||||
"driver": "file",
|
||||
"location": "storage/framework/cache"
|
||||
#
|
||||
},
|
||||
"redis": {
|
||||
"driver": "redis",
|
||||
"host": "127.0.0.1",
|
||||
"port": "6379",
|
||||
"password": "",
|
||||
"name": "project_name",
|
||||
},
|
||||
"memcache": {
|
||||
"driver": "memcache",
|
||||
"host": "127.0.0.1",
|
||||
"port": "11211",
|
||||
"password": "",
|
||||
"name": "project_name",
|
||||
},
|
||||
}
|
56
myapp/config/database.py
Normal file
56
myapp/config/database.py
Normal file
|
@ -0,0 +1,56 @@
|
|||
from masonite.environment import LoadEnvironment, env
|
||||
from masoniteorm.connections import ConnectionResolver
|
||||
|
||||
# Loads in the environment variables when this page is imported.
|
||||
LoadEnvironment()
|
||||
|
||||
"""
|
||||
The connections here don't determine the database but determine the "connection".
|
||||
They can be named whatever you want.
|
||||
"""
|
||||
DATABASES = {
|
||||
"default": env("DB_CONNECTION", "sqlite"),
|
||||
"sqlite": {
|
||||
"driver": "sqlite",
|
||||
"database": env("SQLITE_DB_DATABASE", "masonite.sqlite3"),
|
||||
"prefix": "",
|
||||
"log_queries": env("DB_LOG"),
|
||||
},
|
||||
"mysql": {
|
||||
"driver": "mysql",
|
||||
"host": env("DB_HOST"),
|
||||
"user": env("DB_USERNAME"),
|
||||
"password": env("DB_PASSWORD"),
|
||||
"database": env("DB_DATABASE"),
|
||||
"port": env("DB_PORT"),
|
||||
"prefix": "",
|
||||
"grammar": "mysql",
|
||||
"options": {
|
||||
"charset": "utf8mb4",
|
||||
},
|
||||
"log_queries": env("DB_LOG"),
|
||||
},
|
||||
"postgres": {
|
||||
"driver": "postgres",
|
||||
"host": env("DB_HOST"),
|
||||
"user": env("DB_USERNAME"),
|
||||
"password": env("DB_PASSWORD"),
|
||||
"database": env("DB_DATABASE"),
|
||||
"port": env("DB_PORT"),
|
||||
"prefix": "",
|
||||
"grammar": "postgres",
|
||||
"log_queries": env("DB_LOG"),
|
||||
},
|
||||
"mssql": {
|
||||
"driver": "mssql",
|
||||
"host": env("MSSQL_DATABASE_HOST"),
|
||||
"user": env("MSSQL_DATABASE_USER"),
|
||||
"password": env("MSSQL_DATABASE_PASSWORD"),
|
||||
"database": env("MSSQL_DATABASE_DATABASE"),
|
||||
"port": env("MSSQL_DATABASE_PORT"),
|
||||
"prefix": "",
|
||||
"log_queries": env("DB_LOG"),
|
||||
},
|
||||
}
|
||||
|
||||
DB = ConnectionResolver().set_connection_details(DATABASES)
|
24
myapp/config/exceptions.py
Normal file
24
myapp/config/exceptions.py
Normal file
|
@ -0,0 +1,24 @@
|
|||
OPTIONS = {
|
||||
"editor": "vscode",
|
||||
"search_url": "https://www.google.com/search?q=",
|
||||
"links": {
|
||||
"doc": "https://docs.masoniteproject.com",
|
||||
"repo": "https://github.com/MasoniteFramework/masonite",
|
||||
},
|
||||
"stack": {"offset": 10, "shorten": True},
|
||||
"hide_sensitive_data": True,
|
||||
}
|
||||
|
||||
HANDLERS = {
|
||||
"context": True,
|
||||
"dumps": True,
|
||||
"solutions": {
|
||||
"stackoverflow": False,
|
||||
"possible_solutions": True
|
||||
},
|
||||
"recommendations": {
|
||||
"packages_updates": {
|
||||
"list": ["exceptionite", "masonite", "masonite-orm", "pytest"]
|
||||
}
|
||||
},
|
||||
}
|
21
myapp/config/filesystem.py
Normal file
21
myapp/config/filesystem.py
Normal file
|
@ -0,0 +1,21 @@
|
|||
from masonite.environment import env
|
||||
from masonite.utils.location import base_path
|
||||
|
||||
|
||||
DISKS = {
|
||||
"default": "local",
|
||||
"local": {"driver": "file", "path": base_path("storage/framework/filesystem")},
|
||||
"s3": {
|
||||
"driver": "s3",
|
||||
"client": env("S3_CLIENT"),
|
||||
"secret": env("S3_SECRET"),
|
||||
"bucket": env("S3_BUCKET"),
|
||||
},
|
||||
}
|
||||
|
||||
STATICFILES = {
|
||||
# folder # template alias
|
||||
"storage/static": "static/",
|
||||
"storage/compiled": "assets/",
|
||||
"storage/public": "/",
|
||||
}
|
23
myapp/config/mail.py
Normal file
23
myapp/config/mail.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
from masonite.environment import env
|
||||
|
||||
|
||||
FROM_EMAIL = env("MAIL_FROM", "no-reply@masonite.com")
|
||||
|
||||
DRIVERS = {
|
||||
"default": env("MAIL_DRIVER", "terminal"),
|
||||
"smtp": {
|
||||
"host": env("MAIL_HOST"),
|
||||
"port": env("MAIL_PORT"),
|
||||
"username": env("MAIL_USERNAME"),
|
||||
"password": env("MAIL_PASSWORD"),
|
||||
"from": FROM_EMAIL,
|
||||
},
|
||||
"mailgun": {
|
||||
"domain": env("MAILGUN_DOMAIN"),
|
||||
"secret": env("MAILGUN_SECRET"),
|
||||
"from": FROM_EMAIL,
|
||||
},
|
||||
"terminal": {
|
||||
"from": FROM_EMAIL,
|
||||
},
|
||||
}
|
20
myapp/config/notification.py
Normal file
20
myapp/config/notification.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
from masonite.environment import env
|
||||
|
||||
|
||||
DRIVERS = {
|
||||
"slack": {
|
||||
"token": env("SLACK_TOKEN", ""), # used for API mode
|
||||
"webhook": env("SLACK_WEBHOOK", ""), # used for webhook mode
|
||||
},
|
||||
"vonage": {
|
||||
"key": env("VONAGE_KEY", ""),
|
||||
"secret": env("VONAGE_SECRET", ""),
|
||||
"sms_from": env("VONAGE_SMS_FROM", "+33000000000"),
|
||||
},
|
||||
"database": {
|
||||
"connection": "sqlite",
|
||||
"table": "notifications",
|
||||
},
|
||||
}
|
||||
|
||||
DRY = False
|
56
myapp/config/providers.py
Normal file
56
myapp/config/providers.py
Normal file
|
@ -0,0 +1,56 @@
|
|||
from masonite.providers import (
|
||||
RouteProvider,
|
||||
FrameworkProvider,
|
||||
ViewProvider,
|
||||
WhitenoiseProvider,
|
||||
ExceptionProvider,
|
||||
MailProvider,
|
||||
SessionProvider,
|
||||
QueueProvider,
|
||||
CacheProvider,
|
||||
EventProvider,
|
||||
StorageProvider,
|
||||
HelpersProvider,
|
||||
BroadcastProvider,
|
||||
AuthenticationProvider,
|
||||
AuthorizationProvider,
|
||||
HashServiceProvider,
|
||||
ORMProvider,
|
||||
)
|
||||
|
||||
# Third Party Providers
|
||||
from masonite.api.providers import ApiProvider
|
||||
|
||||
from masonite.scheduling.providers import ScheduleProvider
|
||||
from masonite.notification.providers import NotificationProvider
|
||||
from masonite.validation.providers import ValidationProvider
|
||||
|
||||
from app.providers import AppProvider
|
||||
|
||||
PROVIDERS = [
|
||||
FrameworkProvider,
|
||||
HelpersProvider,
|
||||
RouteProvider,
|
||||
ViewProvider,
|
||||
WhitenoiseProvider,
|
||||
ExceptionProvider,
|
||||
MailProvider,
|
||||
NotificationProvider,
|
||||
SessionProvider,
|
||||
CacheProvider,
|
||||
QueueProvider,
|
||||
ScheduleProvider,
|
||||
EventProvider,
|
||||
StorageProvider,
|
||||
BroadcastProvider,
|
||||
HashServiceProvider,
|
||||
AuthenticationProvider,
|
||||
ValidationProvider,
|
||||
AuthorizationProvider,
|
||||
ORMProvider,
|
||||
AppProvider,
|
||||
|
||||
# Third Party Providers
|
||||
ApiProvider,
|
||||
|
||||
]
|
39
myapp/config/queue.py
Normal file
39
myapp/config/queue.py
Normal file
|
@ -0,0 +1,39 @@
|
|||
from masonite.environment import env
|
||||
|
||||
|
||||
DRIVERS = {
|
||||
"default": env("QUEUE_DRIVER", "async"),
|
||||
"database": {
|
||||
"connection": "sqlite",
|
||||
"table": "jobs",
|
||||
"failed_table": "failed_jobs",
|
||||
"attempts": 3,
|
||||
"poll": 5,
|
||||
},
|
||||
"redis": {
|
||||
"name": env("QUEUE_USERNAME", "guest"),
|
||||
"password": env("QUEUE_PASSWORD", "guest"),
|
||||
"port": env("QUEUE_PORT", "6379"),
|
||||
"host": env("QUEUE_HOST", "localhost"),
|
||||
},
|
||||
"amqp": {
|
||||
"username": env("QUEUE_USERNAME", "guest"),
|
||||
"password": env("QUEUE_PASSWORD", "guest"),
|
||||
"port": env("QUEUE_PORT", "5672"),
|
||||
"vhost": env("QUEUE_VHOST", ""),
|
||||
"host": env("QUEUE_HOST", "localhost"),
|
||||
"exchange": "",
|
||||
# See https://pika.readthedocs.io/en/stable/modules/parameters.html#pika.connection.URLParameters
|
||||
# for valid connection options values
|
||||
"connection_options": {},
|
||||
"channel": env("QUEUE_CHANNEL", "default"),
|
||||
"queue": "masonite4",
|
||||
"tz": "UTC",
|
||||
},
|
||||
"async": {
|
||||
"blocking": True,
|
||||
"callback": "handle",
|
||||
"mode": "threading",
|
||||
"workers": 1,
|
||||
},
|
||||
}
|
7
myapp/config/session.py
Normal file
7
myapp/config/session.py
Normal file
|
@ -0,0 +1,7 @@
|
|||
# from masonite.environment import env
|
||||
|
||||
|
||||
DRIVERS = {
|
||||
"default": "cookie",
|
||||
"cookie": {},
|
||||
}
|
11
myapp/craft
Normal file
11
myapp/craft
Normal file
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env python
|
||||
"""Craft Command.
|
||||
This module is really used for backup only if the masonite CLI cannot import this for you.
|
||||
This can be used by running "python craft". This module is not ran when the CLI can
|
||||
successfully import commands for you.
|
||||
"""
|
||||
|
||||
from wsgi import application
|
||||
|
||||
if __name__ == "__main__":
|
||||
application.make("commands").run()
|
|
@ -0,0 +1,15 @@
|
|||
from masoniteorm.migrations import Migration
|
||||
|
||||
|
||||
class CreatePasswordResetTable(Migration):
|
||||
def up(self):
|
||||
"""Run the migrations."""
|
||||
with self.schema.create("password_resets") as table:
|
||||
table.string("email").unique()
|
||||
table.string("token")
|
||||
table.datetime("expires_at").nullable()
|
||||
table.datetime("created_at")
|
||||
|
||||
def down(self):
|
||||
"""Revert the migrations."""
|
||||
self.schema.drop("password_resets")
|
|
@ -0,0 +1,21 @@
|
|||
from masoniteorm.migrations import Migration
|
||||
|
||||
|
||||
class CreateUsersTable(Migration):
|
||||
def up(self):
|
||||
"""Run the migrations."""
|
||||
with self.schema.create("users") as table:
|
||||
table.increments("id")
|
||||
table.string("name")
|
||||
table.string("email").unique()
|
||||
table.string("password")
|
||||
table.string("second_password").nullable()
|
||||
table.string("remember_token").nullable()
|
||||
table.string("phone").nullable()
|
||||
table.timestamp("verified_at").nullable()
|
||||
table.timestamps()
|
||||
table.soft_deletes()
|
||||
|
||||
def down(self):
|
||||
"""Revert the migrations."""
|
||||
self.schema.drop("users")
|
0
myapp/databases/seeds/__init__.py
Normal file
0
myapp/databases/seeds/__init__.py
Normal file
10
myapp/databases/seeds/database_seeder.py
Normal file
10
myapp/databases/seeds/database_seeder.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
"""Base Database Seeder Module."""
|
||||
from masoniteorm.seeds import Seeder
|
||||
|
||||
from .user_table_seeder import UserTableSeeder
|
||||
|
||||
|
||||
class DatabaseSeeder(Seeder):
|
||||
def run(self):
|
||||
"""Run the database seeds."""
|
||||
self.call(UserTableSeeder)
|
18
myapp/databases/seeds/user_table_seeder.py
Normal file
18
myapp/databases/seeds/user_table_seeder.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
"""UserTableSeeder Seeder."""
|
||||
from masoniteorm.seeds import Seeder
|
||||
from masonite.facades import Hash
|
||||
|
||||
from app.models.User import User
|
||||
|
||||
|
||||
class UserTableSeeder(Seeder):
|
||||
def run(self):
|
||||
"""Run the database seeds."""
|
||||
User.create(
|
||||
{
|
||||
"name": "Joe",
|
||||
"email": "user@example.com",
|
||||
"password": Hash.make("secret"),
|
||||
"phone": "+123456789",
|
||||
}
|
||||
)
|
9
myapp/makefile
Normal file
9
myapp/makefile
Normal file
|
@ -0,0 +1,9 @@
|
|||
init:
|
||||
pip install -r requirements.txt
|
||||
lint:
|
||||
python -m flake8 .
|
||||
format:
|
||||
black .
|
||||
make lint
|
||||
serve:
|
||||
python craft serve
|
17
myapp/package.json
Normal file
17
myapp/package.json
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "npm run development",
|
||||
"development": "mix",
|
||||
"watch": "mix watch",
|
||||
"watch-poll": "mix watch -- --watch-options-poll=1000",
|
||||
"hot": "mix watch --hot",
|
||||
"prod": "npm run production",
|
||||
"production": "mix --production"
|
||||
},
|
||||
"devDependencies": {
|
||||
"axios": "^0.22.0",
|
||||
"laravel-mix": "^6.0.39",
|
||||
"postcss": "^8.4.5"
|
||||
}
|
||||
}
|
11
myapp/pyproject.toml
Normal file
11
myapp/pyproject.toml
Normal file
|
@ -0,0 +1,11 @@
|
|||
[tool.black]
|
||||
line-length = 99
|
||||
target-version = ['py37']
|
||||
include = '\.pyi?$'
|
||||
exclude = '(\.git|\.venv|\.idea|templates|resources|storage|databases\/migrations|node_modules)'
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
minversion = "6.0"
|
||||
testpaths = [
|
||||
"tests",
|
||||
]
|
2
myapp/requirements.txt
Normal file
2
myapp/requirements.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
masonite>=4.0,<5.0
|
||||
masonite-orm>=2.0,<3.0
|
1
myapp/resources/css/app.css
Normal file
1
myapp/resources/css/app.css
Normal file
|
@ -0,0 +1 @@
|
|||
/* Put your CSS here */
|
2
myapp/resources/js/app.js
Normal file
2
myapp/resources/js/app.js
Normal file
|
@ -0,0 +1,2 @@
|
|||
|
||||
require("./bootstrap.js")
|
23
myapp/resources/js/bootstrap.js
vendored
Normal file
23
myapp/resources/js/bootstrap.js
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/**
|
||||
* We'll load the axios HTTP library which allows us to easily issue requests
|
||||
* to our Masonite back-end. This library automatically handles sending the
|
||||
* CSRF token as a header based on the value of the "XSRF" token cookie.
|
||||
*/
|
||||
|
||||
window.axios = require('axios');
|
||||
|
||||
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
||||
|
||||
/**
|
||||
* Next we will register the CSRF Token as a common header with Axios so that
|
||||
* all outgoing HTTP requests automatically have it attached. This is just
|
||||
* a simple convenience so we don't have to attach every token manually.
|
||||
*/
|
||||
|
||||
let token = document.head.querySelector('meta[name="csrf-token"]');
|
||||
|
||||
if (token) {
|
||||
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
|
||||
} else {
|
||||
console.error('CSRF token not found: https://docs.masoniteproject.com/features/csrf#ajax-vue-axios');
|
||||
}
|
7
myapp/routes/api.py
Normal file
7
myapp/routes/api.py
Normal file
|
@ -0,0 +1,7 @@
|
|||
# routes/api.py
|
||||
|
||||
from masonite.routes import Route
|
||||
|
||||
ROUTES = [
|
||||
Route.get('/users', 'UsersController@index')
|
||||
]
|
14
myapp/routes/web.py
Normal file
14
myapp/routes/web.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
from masonite.routes import Route
|
||||
from masonite.api import Api
|
||||
|
||||
ROUTES = [
|
||||
# Route.get("/", "WelcomeController@show"),
|
||||
Route.get("/", "PatientController@show"),
|
||||
Route.post("/patient/move", "PatientController@move"),
|
||||
|
||||
# Blog Routes
|
||||
Route.get('/blog', 'BlogController@show'),
|
||||
|
||||
]
|
||||
|
||||
ROUTES += Api.routes(auth_route="/api/auth", reauth_route="/api/reauth")
|
8
myapp/setup.cfg
Normal file
8
myapp/setup.cfg
Normal file
|
@ -0,0 +1,8 @@
|
|||
[flake8]
|
||||
max-line-length = 99
|
||||
exclude = .git,.venv,.idea,templates,resources,storage,databases/migrations,resources,node_modules,__pycache__
|
||||
ignore=E501,F401,E203,E128,E402,E731,F821,E712,W503,F811
|
||||
|
||||
[coverage:run]
|
||||
include = backend/*
|
||||
omit = *migrations*, *tests*, config/*, manage.py, conftest.py
|
0
myapp/storage/.gitignore
vendored
Normal file
0
myapp/storage/.gitignore
vendored
Normal file
BIN
myapp/storage/public/favicon.ico
Normal file
BIN
myapp/storage/public/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
BIN
myapp/storage/public/logo.png
Normal file
BIN
myapp/storage/public/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
2
myapp/storage/public/robots.txt
Normal file
2
myapp/storage/public/robots.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
User-agent: *
|
||||
Disallow:
|
0
myapp/templates/__init__.py
Normal file
0
myapp/templates/__init__.py
Normal file
24
myapp/templates/base-tailwind.html
Normal file
24
myapp/templates/base-tailwind.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="csrf-token" content="{{ csrf_token }}">
|
||||
<title>{% block title %}Masonite 4{% endblock %}</title>
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
<link
|
||||
href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
{% block head %}
|
||||
<!-- <link rel="stylesheet" href="/assets/css/app.css"> -->
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
{% block content %}{% endblock %}
|
||||
{% block js %}
|
||||
<!-- <script src="/assets/js/app.js"></script> -->
|
||||
{% endblock %}
|
||||
</body>
|
||||
</html>
|
26
myapp/templates/base.html
Normal file
26
myapp/templates/base.html
Normal file
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="csrf-token" content="{{ csrf_token }}">
|
||||
<title>{% block title %}Masonite 4{% endblock %}</title>
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
|
||||
<!-- CSS only -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
|
||||
|
||||
{% block head %}
|
||||
<!-- <link rel="stylesheet" href="/assets/css/app.css"> -->
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
{% block content %}{% endblock %}
|
||||
<!-- JavaScript Bundle with Popper -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
|
||||
{% block js %}
|
||||
<!-- <script src="/assets/js/app.js"></script> -->
|
||||
{% endblock %}
|
||||
</body>
|
||||
</html>
|
1
myapp/templates/blog.html
Normal file
1
myapp/templates/blog.html
Normal file
|
@ -0,0 +1 @@
|
|||
This is a blog
|
20
myapp/templates/errors/403.html
Normal file
20
myapp/templates/errors/403.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Permission Denied</title>
|
||||
<link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{% block content %}
|
||||
<div class="h-screen flex flex-col items-center text-center justify-center">
|
||||
<p class="text-center">Oops looks like you don't have access to this page !</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
</body>
|
||||
|
||||
</html>
|
20
myapp/templates/errors/404.html
Normal file
20
myapp/templates/errors/404.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Page Not Found</title>
|
||||
<link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{% block content %}
|
||||
<div class="h-screen flex flex-col items-center text-center justify-center">
|
||||
<p class="text-center">Oops this page does not exist !</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
</body>
|
||||
|
||||
</html>
|
20
myapp/templates/errors/500.html
Normal file
20
myapp/templates/errors/500.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Error 500</title>
|
||||
<link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{% block content %}
|
||||
<div class="h-screen flex flex-col items-center text-center justify-center">
|
||||
<p class="text-center">Oops an error happened !</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
</body>
|
||||
|
||||
</html>
|
20
myapp/templates/maintenance.html
Normal file
20
myapp/templates/maintenance.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Server Maintenance</title>
|
||||
<link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{% block content %}
|
||||
<div class="h-screen flex flex-col items-center justify-center">
|
||||
<p class="text-center">Sorry, this site is currently down for maintenance.</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
</body>
|
||||
|
||||
</html>
|
18
myapp/templates/patient.html
Normal file
18
myapp/templates/patient.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
@extends 'base.html'
|
||||
|
||||
|
||||
@block content
|
||||
|
||||
<form action="/patient/move" method="POST">
|
||||
{{ csrf_field }}
|
||||
<div class="mb-3">
|
||||
<label for="MRN" class="form-label">病歷號</label>
|
||||
<input type="text" class="form-control" id="MRN" aria-describedby="MRNHelp">
|
||||
<div id="MRNHelp" class="form-text">Medical record number</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</form>
|
||||
|
||||
@endblock
|
||||
|
||||
|
34
myapp/templates/welcome.html
Normal file
34
myapp/templates/welcome.html
Normal file
|
@ -0,0 +1,34 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}Welcome on Masonite 4{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="h-screen flex flex-col items-center justify-center">
|
||||
<img src="/logo.png" alt="Masonite Logo" class="h-16 w-16 mb-4">
|
||||
<div class="text-gray-500 text-5xl mb-10 tracking-wide">
|
||||
Masonite 4
|
||||
</div>
|
||||
|
||||
<nav class="flex space-x-4 justify-center text-gray-500 uppercase text-sm">
|
||||
<a href="https://docs.masoniteproject.com" class="px-3 py-2 hover:text-indigo-700">
|
||||
Documentation
|
||||
</a>
|
||||
|
||||
<a href="https://discord.gg/HEQBAbTXt2" class="px-3 py-2 hover:text-indigo-700">
|
||||
Join Discord Community
|
||||
</a>
|
||||
|
||||
<a href="https://github.com/MasoniteFramework/masonite" class="px-3 py-2 hover:text-indigo-700">
|
||||
GitHub
|
||||
</a>
|
||||
|
||||
<a href="https://github.com/sponsors/MasoniteFramework" class="px-3 py-2 hover:text-indigo-700">
|
||||
Sponsor us
|
||||
</a>
|
||||
|
||||
<a href="https://twitter.com/masoniteproject" class="px-3 py-2 hover:text-indigo-700">
|
||||
Follow us on Twitter
|
||||
</a>
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
6
myapp/tests/TestCase.py
Normal file
6
myapp/tests/TestCase.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
from masonite.tests import TestCase
|
||||
|
||||
|
||||
class TestCase(TestCase):
|
||||
def setUp(self):
|
||||
super().setUp()
|
1
myapp/tests/__init__.py
Normal file
1
myapp/tests/__init__.py
Normal file
|
@ -0,0 +1 @@
|
|||
from .TestCase import TestCase
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue