This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SageMath code used to calculate maxN(r,2;n) and generate Table 4 | |
# Kevin Gomez -- 8/7/2020 | |
# Rank of a partition p | |
def rank(p): | |
return max(p) - len(p) | |
# N(r,t;n), the r (mod t) rank counting function | |
def N(r,t,n): | |
return len(list(filter(lambda p: rank(p) % t == r, Partitions(n)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Cache to accelerate calculation of traces | |
from functools import cache | |
# Default power series ring and precision | |
# May need to increase for large weight traces | |
R.<q> = PowerSeriesRing(QQ) | |
PREC = 200 | |
# Gets the coefficient of q^n in f | |
def coeff(f, n): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from operator import attrgetter | |
from operator import itemgetter | |
@itemgetter | |
@slice | |
@int | |
@next | |
@reversed | |
@str |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c,o,d,e =[ 32],[95], [32,124],[124,32] ;vars(vars( ) [dir( )[1]])[ | |
dir(vars() [dir( )[1]])[ 136] ]( vars( str) [dir( str)[56]]( str(1)[:~1],map( | |
vars(vars( )[dir()[1]])[dir( vars( )[dir( )[1]]) [92]],[*c*2,95,*c* 4,95,*c*10,95,*c*3 | |
,95,*c*10, *o*2,*c*10,*o*2,*c* 15,95,*c *7,95,* c*3,95,32,10,*d*2,* c*2,*e,124,*c*8,*e* | |
4,* c* 8 ,92,32 ,92,*c*8 ,47,32 ,47,*c* 14,*e*2 ,*c*4, *e*3,124 ,10,*d | |
*2,*o* 2,*e*2, *c*2,*o *3,32, *d*4,* c*3,*o*3 ,*c* 4, | |
92,32, 92,*c*2, 47,92,* c*2,47,32,47,*c*2 ,*o*3,* c*4,95, | |
32,*o* 2,32,*d *2,*c*3 ,*o*2,*e*3, 124, 10,*d,* c*2,*o* | |
2, *c* 2,*e,32 ,47,32, 95,32,92,*d*4, *c*2,47 ,32,95, | |
32,92, *c*4,92 ,32,92, 47,*c* 2,92,47 ,32,47, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Dock: | |
""" | |
Base class to inherit to implement the loader system | |
""" | |
loaders = {} | |
def load(self, data): | |
""" | |
Load some data based on the data's type |