give me a proper sequence of preferance and follow follwing rule while arranging them follow them 1 give state preferance
Which state preference order should I use? · How should MD Radio Diagnosis and DNB Radio Diagnosis be ranked? · After state preference, what should decide the order?
give me order according to cr 2025 rank and firstly arrange MD Radio then when all MD seat are finished arrange DNB give proper list use above heading like state institute course fee stipend bond bond penalty cr 2025 create a file that i can easily copy and paste in my excel
~/
mkdir -p "/tmp/workspace/radiology_preferences/output" [0m&& python - <<'PY' from PIL import Image import os base='/tmp/workspace/attachments/bd8402e4-9873-492f-a583-d08bb8e28acc' for f in sorted(os.listdir(base)): if f.endswith('.jpg'): im=Image.open(os.path.join(base,f)) print(f, im.size) PY
python - <<'PY' import pytesseract from PIL import Image,ImageEnhance,ImageFilter p='/tmp/workspace/attachments/bd8402e4-9873-492f-a583-d08bb8e28acc/photo_2026-10-16_15-51-30.jpg' im=Image.open(p).crop((0,115,1279,750)).resize((2560,1270)) im=ImageEnhance.Contrast(im).enhance(2) print(pytesseract.image_to_string(im,config='--psm 6')) PY
which tesseract; python - <<'PY' from PIL import Image p='/tmp/workspace/attachments/bd8402e4-9873-492f-a583-d08bb8e28acc/photo_2026-10-16_15-51-30.jpg' im=Image.open(p).crop((0,100,1280,760)).resize((3840,1980)) im.save('/tmp/workspace/radiology_preferences/crop.png') PY; tesseract "/tmp/workspace/radiology_preferences/crop.png" stdout --psm 6
python - <<'PY' from openpyxl import Workbook from openpyxl.styles import Font, PatternFill, Alignment from openpyxl.worksheet.table import Table, TableStyleInfo from openpyxl.utils import get_column_letter from pathlib import Path out=Path('/tmp/workspace/radiology_preferences/output') out.mkdir(parents=True,exist_ok=True) # State, Institute, Course, Fee, Stipend Year 1, Bond Years, Bond Penalty, CR 2025 md=[] def M(s,i,fee,stip,bond,pen,cr): md.append([s,i,'MD Radio Diagnosis',fee,stip,bond,pen,cr]) # Delhi M('Delhi','VMMC, Delhi',15000,120965,1,2000000,25);M('Delhi','VMMC, Delhi',15000,120965,1,2000000,40) M('Delhi','ABVIMS (Dr RML Hospital), Delhi',51000,136008,1,2000000,73);M('Delhi','MAMC, Delhi',16200,132336,1,2000000,94);M('Delhi','MAMC, Delhi',16200,132336,1,2000000,60) M('Delhi','Lady Hardinge Medical College, Delhi',16200,126927,1,2000000,108);M('Delhi','Lady Hardinge Medical College, Delhi',16200,126927,1,2000000,283) M('Delhi','ABVIMS (Dr RML Hospital), Delhi',51000,136008,1,2000000,178);M('Delhi','UCMS, Delhi',47220,132336,1,2000000,187);M('Delhi','UCMS, Delhi',47220,132336,1,2000000,361);M('Delhi','GB Pant PGIMER, Delhi',16200,126927,1,2000000,0) # Maharashtra for inst,cr in [('Seth GS Medical College, Mumbai',58),('Seth GS Medical College, Mumbai',133),('Grant Medical College, Mumbai',145),('Grant Medical College, Mumbai',383),('Lokmanya Tilak Municipal Medical College, Sion, Mumbai',209),('Lokmanya Tilak Municipal Medical College, Sion, Mumbai',231),('Topiwala National Medical College, Mumbai',484),('BJ Medical College, Pune',500),('Indira Gandhi Government Medical College, Nagpur',553),('Government Medical College, Chhatrapati Sambhajinagar',568),('Government Medical College, Akola',585),('Government Medical College, Nagpur',357),('Government Medical College, Nagpur',692),('Government Medical College, Chhatrapati Sambhajinagar',865),('MGM Medical College, Wardha',772),('Government Medical College, Miraj',592),('Government Medical College, Miraj',1244),('Government & MPGI, Nashik',1224),('Rajiv Gandhi Medical College & CSMH, Thane',0),('Government Medical College, Jalgaon',1161),('Government Medical College, Nanded',1262),('Government Medical College, Nanded',1521),('Government Medical College, Latur',0),('Government Medical College, Latur',1631),('VMMC, Solapur',1002)]: M('Maharashtra',inst,157100,93559,1,5000000,cr) # UP for inst,fee,stip,bond,pen,cr in [('IMS (BHU), Varanasi',48226,112054,0,0,179),('IMS (BHU), Varanasi',48226,112054,0,0,190),('SGPGI, Lucknow',35000,115506,2,4000000,104),('SGPGI, Lucknow',35000,115506,2,4000000,343),('JNMC (AMU), Aligarh',54700,114975,0,0,326),('JNMC (AMU), Aligarh',54700,114975,0,0,395),('KGMU, Lucknow',54700,126725,2,4000000,274),('KGMU, Lucknow',54700,126725,2,4000000,596),('Dr RML IMS, Lucknow',35000,126726,2,4000000,410),('MLN Medical College, Allahabad',24000,110646,2,4000000,638),('MLN Medical College, Allahabad',24000,110646,2,4000000,1029),('MLB Medical College, Jhansi',24000,110646,2,4000000,673),('MLB Medical College, Jhansi',24000,110646,2,4000000,0),('SN Medical College, Agra',24000,110646,2,4000000,1456),('GSVM Medical College, Kanpur',24000,110646,2,4000000,1604),('BRD Medical College, Gorakhpur',24000,110646,2,4000000,1895)]: M('Uttar Pradesh',inst,fee,stip,bond,pen,cr) # Gujarat for inst,cr in [('BJMC, Ahmedabad',203),('BJMC, Ahmedabad',744),('Medical College, Baroda',425),('Medical College, Baroda',896),('MP Shah Medical College, Jamnagar',899),('MP Shah Medical College, Jamnagar',1123),('PDU Medical College, Rajkot',871),('PDU Medical College, Rajkot',1494),('Government Medical College, Surat',827),('Government Medical College, Surat',1999),('Government Medical College, Bhavnagar',0),('GR Doshi & KM Mehta, Ahmedabad',0)]: M('Gujarat',inst,30000,100800,1,4000000,cr) # MP for inst,cr in [('Gajra Raja Medical College, Gwalior',752),('Gajra Raja Medical College, Gwalior',1178),('Gandhi Medical College, Bhopal',578),('Gandhi Medical College, Bhopal',955),('MGM Medical College, Indore',933),('MGM Medical College, Indore',1718),('SSMC, Rewa',0),('SSMC, Rewa',0),('NSC Bose Medical College, Jabalpur',1144),('NSC Bose Medical College, Jabalpur',1731)]: M('Madhya Pradesh',inst,101500,75444,1,1000000,cr) M('Maharashtra','Tata Memorial Hospital, Mumbai',105500,105840,1,2500000,486) M('Uttar Pradesh','Homi Bhabha Cancer Hospital, Varanasi',105500,105840,1,2500000,0) # filter unreported CR, user asked CR ordering and source displayed dash md=[x for x in md if x[-1]>0] # DNB dnb=[] def D(s,i,stip,cr,fee=125000,bond=0,pen=0): dnb.append([s,i,'DNB Radio Diagnosis',fee,stip,bond,pen,cr]) for x in [ ('Delhi','Sir Ganga Ram Hospital, Delhi',92000,384),('Maharashtra','PD Hinduja Hospital, Mumbai',89700,612),('Maharashtra','Kokilaben Dhirubhai Ambani Hospital, Mumbai',85000,510),('Maharashtra','Hurkisondas Nurrotamdas Hospital, Mumbai',94000,842),('Maharashtra','Deenanath Mangeshkar Hospital, Pune',89698,1103),('Maharashtra','Lilavati Hospital, Mumbai',86630,773),('Delhi','Holy Family Hospital, Delhi',82150,1196),('Delhi','Max Super Speciality Hospital, Saket, Delhi',60000,946),('Delhi',"St Stephen's Hospital, Delhi",58000,1137),('Delhi','Indraprastha Apollo Hospital, Delhi',64500,859),('Delhi','Batra Hospital, Delhi',61000,897),('Maharashtra','Jaslok Hospital, Mumbai',86629,1091),('Maharashtra','Holy Spirit Hospital, Mumbai',86630,1416),('Maharashtra','Jupiter Hospital, Thane',92470,1571),('Maharashtra','Breach Candy Hospital, Mumbai',89489,1390),('Delhi','Aakash Healthcare Super Speciality Hospital, Dwarka',80000,1500),('Uttar Pradesh','Apollomedics Super Speciality Hospital, Lucknow',80000,2151),('Uttar Pradesh','Government Institute of Medical Sciences, Greater Noida',110646,2149),('Uttar Pradesh','Yatharth Super Speciality Hospital, Omega 1, Greater Noida',80000,2254),('Delhi','Dr BL Kapur Memorial Hospital, Delhi',60000,1608),('Gujarat','Apollo Hospital, Gandhinagar',100800,1163),('Uttar Pradesh','Medanta Hospital, Sushant Golf City, Lucknow',65000,2039),('Maharashtra','Fortis Hospital, Mulund, Mumbai',86750,1641),('Delhi','Mahajan Imaging & Labs, Delhi (Joint)',80000,1790),('Maharashtra','BARC Hospital, Mumbai',96000,1930),('Madhya Pradesh','Choithram Hospital, Indore',75444,2777),('Delhi','Human Care Medical Trust, Dwarka',57000,2340),('Delhi','Rajiv Gandhi Cancer Institute, Delhi',73000,1394),('Delhi','Max Super Speciality Hospital, Shalimar Bagh',60000,2169),('Delhi','Shri Balaji Action Medical Institute, Delhi',72000,2067),('Uttar Pradesh','Yashoda Super Speciality Hospital, Ghaziabad',70000,2825),('Delhi','Max Super Speciality Hospital, Patparganj, Delhi',60000,1998),('Uttar Pradesh','Max Super Speciality Hospital, Noida',60000,1772),('Delhi','Dharamshila Narayana Hospital, Delhi',69000,2682),('Uttar Pradesh','Yatharth Super Speciality Hospital, Sector 1, Greater Noida',80000,1923),('Gujarat','Shalby Hospital, SG Highway, Ahmedabad',100800,2527),('Maharashtra','Dr B Nanavati Hospital, Mumbai',86630,1589),('Madhya Pradesh','Bombay Hospital, Indore',75444,2155),('Maharashtra','Jehangir Hospital, Pune',87000,1956),('Maharashtra','Apollo Hospital, Navi Mumbai',89000,2195),('Maharashtra','Saifee Hospital, Mumbai',89700,2031),('Maharashtra','Ruby Hall Clinic, Pune',89698,1483),('Maharashtra','KEM Hospital, Pune',90000,967),('Uttar Pradesh','Yashoda Super Speciality Hospital, Ghaziabad',62000,2590),('Maharashtra','Sahyadri Super Speciality Hospital, Karve Road, Pune',80000,2517),('Delhi','Fortis Hospital, Shalimar Bagh, Delhi',63000,2759),('Maharashtra','Wockhardt Hospital, Central Mumbai',92000,2534),('Maharashtra','Bai Jerbai Wadia Hospital, Mumbai',76429,2979),('Maharashtra','Holy Family Hospital, Mumbai',85000,2305),('Maharashtra','MGM New Bombay Hospital, Navi Mumbai',89698,2441),('Maharashtra','Sadhu Vaswani Missions, Pune',90000,2086),('Uttar Pradesh','Kailash Hospital, Sector 27, Noida',60000,2845),('Uttar Pradesh','Max Super Speciality Hospital, Lucknow',60000,2352),('Maharashtra','Jupiter Lifeline Hospital, Pune',86000,2576),('Maharashtra','Dr Hedgewar Rugnalaya, Aurangabad',81000,1885),('Maharashtra','Manipal Hospitals, Baner, Pune',89500,3002),('Madhya Pradesh','CHI Hospital, Indore',69115,3067),('Uttar Pradesh','Kailash Hospital Neuro Institute, Noida',60000,2962),('Delhi','Mata Chanan Devi Hospital, Delhi',58900,2932),('Uttar Pradesh','Neo Hospital, Sector 50, Noida',70000,3755),('Madhya Pradesh','Vishesh Jupiter Hospital, Indore',75444,3768),('Gujarat','Gujarat MRI Centre, Ahmedabad',25000,3893),('Maharashtra','Hiranandani Hospital (Fortis), Vashi',50000,2168),('Uttar Pradesh','Vivekananda Polyclinic, Lucknow',61100,3579),('Maharashtra','Ashoka Medicover Hospital, Nashik',86000,3498),('Maharashtra','Apple Saraswati Hospital, Kolhapur',76000,3442),('Uttar Pradesh','Chandan Hospital, Lucknow',85000,3681),('Uttar Pradesh','Regency Hospital, Kanpur',70000,3851),('Maharashtra','Asian Institute of Medical Sciences, Dombivli (E)',83000,3119),('Madhya Pradesh','Bansal Hospital, Shahpura',75000,3350),('Uttar Pradesh','Heritage Hospital, Varanasi',56100,3517),('Madhya Pradesh','Shalby Hospital, RS Bhandari Marg, Indore',69115,4074),('Maharashtra','Shri Vasant Rao Naik Government Medical College, Yavatmal',93559,3177,125000,1,5000000),('Maharashtra','KIMS Kingsway Hospitals, Nagpur',77000,3454),('Maharashtra','Rajiv Gandhi Medical College, Thane',93559,3321,125000,1,5000000) ]: D(*x) # required course groups then ascending closing rank rows=sorted(md,key=lambda r:r[-1])+sorted(dnb,key=lambda r:r[-1]) headers=['State','Institute','Course','Fee (INR)','Stipend Year 1 (INR)','Bond (Years)','Bond Penalty (INR)','CR 2025'] # TSV with (out/'Radiology_Preference_List_Excel.tsv').open('w',encoding='utf-8',newline='') as f: f.write('\t'.join(headers)+'\n') for r in rows: f.write('\t'.join(map(str,r))+'\n') # xlsx wb=Workbook(); ws=wb.active;ws.title='Preference List' ws.append(headers) for r in rows: ws.append(r) ws.freeze_panes='A2';ws.auto_filter.ref=f'A1:H{ws.max_row}' for c in ws[1]: c.font=Font(bold=True,color='FFFFFF'); c.fill=PatternFill('solid',fgColor='1F4E78'); c.alignment=Alignment(horizontal='center') for row in ws.iter_rows(min_row=2): for c in row: c.alignment=Alignment(vertical='top') for col,w in {'A':18,'B':48,'C':23,'D':15,'E':23,'F':14,'G':22,'H':12}.items(): ws.column_dimensions[col].width=w for col in ['D','E','G']: for c in ws[col][1:]: c.number_format='#,##0' ws.row_dimensions[1].height=26 style=TableStyleInfo(name='TableStyleMedium2',showRowStripes=True,showColumnStripes=False) tab=Table(displayName='PreferenceList',ref=f'A1:H{ws.max_row}');tab.tableStyleInfo=style;ws.add_table(tab) ws.sheet_view.showGridLines=False wb.save(out/'Radiology_Preference_List.xlsx') print(len(md),len(dnb),len(rows)) PY ls -lh "/tmp/workspace/radiology_preferences/output"
python - <<'PY' from openpyxl import load_workbook from pathlib import Path p=Path('/tmp/workspace/radiology_preferences/output/Radiology_Preference_List.xlsx') wb=load_workbook(p,data_only=True); ws=wb['Preference List'] rows=list(ws.values) print('rows including header:',len(rows)) print('first 8:') for r in rows[:9]:print(r) print('MD-DNB boundary:') for r in rows[65:71]:print(r) print('last 3:') for r in rows[-3:]:print(r) assert all(r[2]=='MD Radio Diagnosis' for r in rows[1:68]) assert all(r[2]=='DNB Radio Diagnosis' for r in rows[68:]) assert [r[7] for r in rows[1:68]]==sorted(r[7] for r in rows[1:68]) assert [r[7] for r in rows[68:]]==sorted(r[7] for r in rows[68:]) print('validation passed') PY
Radiology Preference List
Spreadsheet · XLSX
Radiology Preference List Excel
TSV File · TSV
king give the list of college whose CR no was not clear and did you include them in the above list or removed
| State | Institute | Course | CR 2025 status |
|---|---|---|---|
| Delhi | GB Pant PGIMER, Delhi | MD Radio Diagnosis | CR 2025 Round 1 shown as “-” |
| Uttar Pradesh | MLB Medical College, Jhansi | MD Radio Diagnosis | CR 2025 Round 1 shown as “-” |
| Uttar Pradesh | Homi Bhabha Cancer Hospital, Varanasi | MD Radio Diagnosis | CR 2025 Round 1 shown as “-” |
| Gujarat | Government Medical College, Bhavnagar | MD Radio Diagnosis | CR 2025 Round 1 and 2 shown as “-” |
| Gujarat | GR Doshi & KM Mehta, Ahmedabad | MD Radio Diagnosis | CR 2025 Round 1 shown as “-” |
| Madhya Pradesh | SSMC, Rewa | MD Radio Diagnosis | CR 2025 Round 1 shown as “-” |
| Maharashtra | Rajiv Gandhi Medical College & CSMH, Thane | MD Radio Diagnosis | CR 2025 Round 1 shown as “-” |
| Maharashtra | Government Medical College, Latur | MD Radio Diagnosis | One listed record had CR 2025 Round 1 as “-” |
kindly just add them in the list you made above just put them where they appeared in image and keep rest of above prompt and give a modified list
~/
python - <<'PY' from pathlib import Path import csv from openpyxl import Workbook, load_workbook from openpyxl.styles import Font, PatternFill, Alignment from openpyxl.worksheet.table import Table, TableStyleInfo src=Path('/tmp/workspace/radiology_preferences/output/Radiology_Preference_List_Excel.tsv') out=Path('/tmp/workspace/radiology_preferences/output') rows=[] with src.open(encoding='utf-8',newline='') as f: reader=csv.reader(f,delimiter='\t') headers=next(reader) for r in reader: rows.append(r) # Previously omitted entries. CR rank shown below is the first available CR 2025 rank visible in supplied screenshots. # Duplicate records are intentionally preserved where they were separate rows in the original screenshots. added=[ ['Delhi','GB Pant PGIMER, Delhi','MD Radio Diagnosis','16200','126927','1','2000000','361 (R2)'], ['Uttar Pradesh','MLB Medical College, Jhansi','MD Radio Diagnosis','24000','110646','2','4000000','1608 (R2)'], ['Uttar Pradesh','Homi Bhabha Cancer Hospital, Varanasi','MD Radio Diagnosis','105500','105840','1','2500000','1850 (R2)'], ['Gujarat','Government Medical College, Bhavnagar','MD Radio Diagnosis','30000','100800','1','4000000','1979 (R3)'], ['Madhya Pradesh','SSMC, Rewa','MD Radio Diagnosis','101500','75444','1','1000000','1798 (R2)'], ['Maharashtra','Rajiv Gandhi Medical College & CSMH, Thane','MD Radio Diagnosis','157100','93559','1','5000000','2576 (R2)'], ['Madhya Pradesh','SSMC, Rewa','MD Radio Diagnosis','101500','75444','1','1000000','2699 (R2)'], ['Maharashtra','Government Medical College, Latur','MD Radio Diagnosis','157100','93559','1','5000000','1660 (R2)'], ['Gujarat','GR Doshi & KM Mehta, Ahmedabad','MD Radio Diagnosis','30000','100800','1','4000000','3297 (R2)'], ] rows += added # numeric rank parsing, retain MD before DNB, ascending CR rank in each course group. def rank(row): return int(row[7].split()[0]) rows.sort(key=lambda r: (0 if r[2]=='MD Radio Diagnosis' else 1, rank(r))) # output TSV with (out/'Radiology_Preference_List_Modified_Excel.tsv').open('w',encoding='utf-8',newline='') as f: writer=csv.writer(f,delimiter='\t',lineterminator='\n') writer.writerow(headers) writer.writerows(rows) # xlsx wb=Workbook(); ws=wb.active; ws.title='Preference List' ws.append(headers) for r in rows: ws.append([int(x) if j in {3,4,5,6} and x.isdigit() else r[j] for j,x in enumerate(r)]) ws.freeze_panes='A2'; ws.auto_filter.ref=f'A1:H{ws.max_row}' for c in ws[1]: c.font=Font(name='Arial',bold=True,color='FFFFFF') c.fill=PatternFill('solid',fgColor='1F4E78') c.alignment=Alignment(horizontal='center',vertical='center') for row in ws.iter_rows(min_row=2): for c in row: c.font=Font(name='Arial',size=10) c.alignment=Alignment(vertical='top') for col,width in {'A':18,'B':52,'C':23,'D':15,'E':23,'F':14,'G':22,'H':14}.items(): ws.column_dimensions[col].width=width for col in ['D','E','G']: for cell in ws[col][1:]: cell.number_format='#,##0' ws.row_dimensions[1].height=28 style=TableStyleInfo(name='TableStyleMedium2',showFirstColumn=False,showLastColumn=False,showRowStripes=True,showColumnStripes=False) tab=Table(displayName='ModifiedPreferenceList',ref=f'A1:H{ws.max_row}');tab.tableStyleInfo=style;ws.add_table(tab) ws.sheet_view.showGridLines=False wb.save(out/'Radiology_Preference_List_Modified.xlsx') print('Added:',len(added),'| Total:',len(rows),'| MD:',sum(r[2]=='MD Radio Diagnosis' for r in rows),'| DNB:',sum(r[2]=='DNB Radio Diagnosis' for r in rows)) for r in rows: if r in added: print('Added order:',r[7],r[0],r[1]) PY python - <<'PY' from openpyxl import load_workbook p='/tmp/workspace/radiology_preferences/output/Radiology_Preference_List_Modified.xlsx' ws=load_workbook(p,data_only=True)['Preference List'] rows=list(ws.values) assert len(rows)==152, len(rows) md=[r for r in rows[1:] if r[2]=='MD Radio Diagnosis']; dnb=[r for r in rows[1:] if r[2]=='DNB Radio Diagnosis'] def n(v):return int(str(v).split()[0]) assert len(md)==76 and len(dnb)==75 assert all(n(md[i][7])<=n(md[i+1][7]) for i in range(len(md)-1)) assert all(n(dnb[i][7])<=n(dnb[i+1][7]) for i in range(len(dnb)-1)) assert rows[1+len(md)][2]=='DNB Radio Diagnosis' print('Verified:',ws.max_row,'data rows=',len(rows)-1,'MD before DNB, each group rank-sorted.') PY ls -lh "/tmp/workspace/radiology_preferences/output/Radiology_Preference_List_Modified.xlsx" "/tmp/workspace/radiology_preferences/output/Radiology_Preference_List_Modified_Excel.tsv"
Radiology Preference List Modified
Spreadsheet · XLSX
Radiology Preference List Modified Excel
TSV File · TSV