Annotation of 43BSD/contrib/apl/lib/gradesys, revision 1.1

1.1     ! root        1: n��*.KB�&       H&number&&&name idn { id nam
        !             2: nam { 8Ynam,'        '
        !             3: n {(^/name= (Rname)Rnam)I1
        !             4: }(n$1YRname)/ok
        !             5: L{'name: ',nam,' not found'
        !             6: } n { 0
        !             7: ok: n { number[n]
        !             8: &score&        dstatdstat x;r;max;min;mean;var;sd;md;med;mode;v;m;n
        !             9: n{Rx
        !            10: r{(max{x[n])-min{(x{x[|Hx])[1]
        !            11: sd{(var{(+/(|x-nRmean{(+/x)%n)*2)%n-1)*0.5
        !            12: md{(+/|x-nRmean)%n
        !            13: med{0.5X+/x[(Sn%2),1+Dn%2]
        !            14: 'sample size           ';n
        !            15: 'maximum               ';max
        !            16: 'minimum               ';min
        !            17: 'range                 ';r
        !            18: 'mean                  ';mean
        !            19: 'variance              ';var
        !            20: 'standard deviation    ';sd
        !            21: 'mean deviation         ';md
        !            22: 'median                        ';med
        !            23: 
        !            24: histr { n hist d;v;t
        !            25: t { Dd%n
        !            26: v { +/(I1+S/t)J.=t+I1
        !            27: r { O- (IS/v)J.$v
        !            28: &numc&&&list &number  summarysummary; i
        !            29: L{' '
        !            30: L{'     score summary'
        !            31: L{'  '
        !            32: L{ head list
        !            33: L { name,Bnumc,score
        !            34:       lcrr { lcr fn ;t;n
        !            35: t { Lcr fn
        !            36: n { 1YRt
        !            37: r { ((n,1)R'['),0 1U(B(n,1)R((In)-I1)),((n,3)R']  '),t
        !            38:       headr { head list
        !            39: r { (((1URlist), 8)R' '),((3X1YRlist)R 0 1 0)\O\  list
        !            40: dropdrop ;idx;sid
        !            41: ask: L{'student class id?'
        !            42:  } (0=sid {L)/0
        !            43:  idx { numberIsid
        !            44:  head list
        !            45:  name[idx;],B numc[idx;],score[idx;]
        !            46:  L{'ok ?'
        !            47:  }('y'#'L)/ask
        !            48:  mask { (Rnumber)R1
        !            49:  mask[idx]{0
        !            50:  name {mask/[1]name
        !            51:  numc {mask/[1]numc
        !            52:  number{mask/number
        !            53:  score { mask/[1]score
        !            54:  L{'dropped'
        !            55:  } ask
        !            56:       statz{stat x;r;max;min;mean;var;sd;md;med;mode;v;m;n
        !            57: n{Rx
        !            58: r{(max{x[n])-min{(x{x[|Hx])[1]
        !            59: sd{(var{(+/(|x-nRmean{(+/x)Pn)*2)Pn-1)*0.5
        !            60: md{(+/|x-nRmean)Pn
        !            61: med{0.5M+/x[(SnP2),1+DnP2]
        !            62: z{n,r,max,min,mean,sd,med
        !            63: &     scoremax&&&    statnameP8number  range   maximum minimum mean    std.dev.median   newstatnewstat data ;i
        !            64:  statscore { (7,1URdata)R0
        !            65:  i {1
        !            66: next: statscore[;i]{stat data[;i]
        !            67:  } ((1URstatscore) & i{i+1)/next
        !            68:  statscore[1;]{+/[1]0#data
        !            69: statsummarystatsummary ;statscore
        !            70: newstat score
        !            71: L{' '
        !            72: L{'      statistics summary'
        !            73: L{' '
        !            74: L{head list
        !            75: L{ statname,(7 3R' '),B D statscore
        !            76: &type,ass  quiz test final&
        !            77: scoretype&&  newscorenewscore ;pos;i;mask;listn;p;it;tp
        !            78: L{'current types are:'
        !            79: L{ type
        !            80: L'{'type ? '
        !            81: p { type find it { L'
        !            82: }(V/p)/oktype
        !            83: L { 'type not found'
        !            84: }0
        !            85: oktype: tp { p/IRp
        !            86: pos { (tp<scoretype)I1
        !            87: mask {1,(Rscoretype)R1
        !            88: mask[pos]{0
        !            89: score { mask\score
        !            90: scoremax { mask\scoremax
        !            91: list { (1,mask)\[1]list
        !            92: scoretype { mask\scoretype
        !            93: scoretype [pos] { tp
        !            94: L{'scoremax?'
        !            95: scoremax[pos]{ L
        !            96: listn { (B+/,scoretype=scoretype[pos]),'       '
        !            97: list[pos+1;] { (1URlist)Rit,listn
        !            98: CJ now input new scores
        !            99: i{1
        !           100: next: pos update number[i]
        !           101: }((Rnumber)&i{i+1)/next
        !           102: L{' new score complete'
        !           103: 
        !           104: updatecol update idn;idx;ip
        !           105:  idx {numberIidn
        !           106:  L{name[idx;],(Bidn),' : ',list[1+col;],'old score ',Bscore[idx;col]
        !           107:  }(0> ip{L)/nc
        !           108:  score[idx;col]{ip
        !           109:  }0
        !           110: nc: L{'no change'
        !           111: newnamenewname ;nname
        !           112: L{ 'names?'
        !           113: next: } (0 = R nname{L')/done
        !           114: name{ name,[1] 1 8 R nname,'        '
        !           115: number{ number,1+ `1 Y number
        !           116: }next
        !           117: done: numc { ((Rnumber),1)Rnumber
        !           118: score{ score,[1] (((Rnumber)-1YRscore),1URscore)R0
        !           119: 'exit'
        !           120: alphaalpha 
        !           121: name{ name[(H| 26 B O\ 0,name);]
        !           122:      analysisanalysis; i; mk; av1; rank
        !           123: tlist{ type,[1](1URtype)R'total   '
        !           124: means{ ((Rnumber),1+1YRtype)R0
        !           125: i{1
        !           126: next1: mk{ scoretype=i
        !           127:  }done XI 0=V/,mk
        !           128: means[;i]{ 100X(+/mk/score) % +/mk/scoremax
        !           129: done: }((1YRtype) >= i{ i+1 )/next1
        !           130: means[;i]{ (+/(means[;Ii-1]X((Rnumber),Rweight)Rweight)) %+/weight
        !           131: means{ (D 0.5+10Xmeans)%10
        !           132: rank{ |V means[;i]
        !           133: L{ 'ranking'
        !           134: tlist{ ((1,1URtlist)R'rank    '),[1]tlist
        !           135: head tlist
        !           136: L{ name[rank;],B(IRrank),means[rank;]
        !           137: ''
        !           138: ''
        !           139: ''
        !           140: av1{ |H [1]|V [1]means
        !           141: tlist{ 1 0Utlist
        !           142: head tlist
        !           143: L{ name,Bav1
        !           144: &weight4&&�B B C�B
        !           145: histgm title histgm data ; i;h;m50
        !           146: m50 { 51 > S/data
        !           147: data { S data%2-m50
        !           148: h {51R0
        !           149: i{0
        !           150: loop: h[i+1] { +/data =i
        !           151: }loop XI 50 & i {i+1
        !           152: ''
        !           153: '              Histogram of ',title
        !           154: ''
        !           155: i { S/h
        !           156: loop2: ' *'[1+ h&i]
        !           157: }loop2 XI 0< i{i-1
        !           158: '|----|----|----|----|----|----|----|----|----|----|'
        !           159: }m50/low
        !           160: '0   10   20   30   40   50   60   70   80   90   100'
        !           161: }0
        !           162: low:'0    5   10   15   20   25   30   35   40   45   50'
        !           163: 
        !           164: findp { list find item
        !           165: p { ^/list=(Rlist)R(1URlist)Y item,'        '
        !           166:       
        !           167: printstatprintstat colnam;data
        !           168: }(0=Rdata{ getcol colnam)/0
        !           169: dstat data
        !           170:       printstat0printstat0 colnam;data
        !           171: }(0=Rdata{ getcol colnam)/0
        !           172: data { (0#data)/data
        !           173: dstat data
        !           174:       getcoldata { getcol colnam;p
        !           175: p { 1U list find colnam
        !           176: }(~V/p)/snf
        !           177: data { ,p/score
        !           178: }0
        !           179: snf:p { tlist find colnam
        !           180: }(~V/p)/nnf
        !           181: data {,p/means
        !           182: }0
        !           183: nnf:'column name ',colnam,' not found'
        !           184: data { 0R0
        !           185:       
        !           186: printhistprinthist colnam;data
        !           187: }(0=Rdata{ getcol colnam)/0
        !           188: colnam histgm data
        !           189:       printhist0printhist0 colnam;data
        !           190: }(0=Rdata{ getcol colnam)/0
        !           191: data { (0#data)/data
        !           192: colnam histgm data
        !           193:       
        !           194: readnamesreadnames file ;nn;fd
        !           195:  fd { 260 Lopen file
        !           196:  name { 0 8 R' '
        !           197: next: nn { Lrd fd
        !           198:  } exit XI0 = R nn
        !           199:  name { name,[1]8Ynn,'        '
        !           200:  } next
        !           201: exit: fd {Lclose fd
        !           202: name { name[(H| 26 B O\ 0,name);]
        !           203: numc { ((1YRname),1)R number { I1YRname
        !           204: score {((Rnumber),0)R0
        !           205: scoretype { 0R0
        !           206: scoremax { 0R0
        !           207: list { 1 8R'number  '
        !           208: setupsetup ;i
        !           209: L{ 'enter the types one per line'
        !           210: type { 0 8 R' '
        !           211: gettype: }next XI 0=Rtt { 'L
        !           212: type { type,[1]8Ytt,'        '
        !           213: }gettype
        !           214: next: L{ 'enter the weights for each type'
        !           215: i { 1
        !           216: weight { 0R0
        !           217: nextweight: 'L { type[i;],' = '
        !           218: weight { weight,L
        !           219: }nextweight XI (1YRtype)&i { i+1
        !           220: 
        !           221: changenam change stype;idx;ip;idn;ic
        !           222: idn { id nam
        !           223: }(0=idn)/0
        !           224: ic { list find stype
        !           225: }(0#V/ic)/ok
        !           226: L{'type not found'
        !           227: }0
        !           228: ok:col { `1 + ic I 1
        !           229:  idx {numberIidn
        !           230:  L{name[idx;],(Bidn),' : ',list[1+col;],'old score ',Bscore[idx;col]
        !           231:  }(0> ip{L)/nc
        !           232:  score[idx;col]{ip
        !           233:  }0
        !           234: nc: L{'no change'
        !           235: 
        !           236: analstatsanalstats ;statscore ;tlist
        !           237: newstat means
        !           238: L {''
        !           239: L {'   analysis statistics'
        !           240: L { ''
        !           241: tlist { type,[1](1URtype)R'total       '
        !           242: head tlist
        !           243: statname,B D statscore
        !           244: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.