content
stringlengths
7
1.05M
print(round(1.23,1)) print(round(1.2345, 3)) # Negative numbers round the ones, tens, hundreds and so on.. print(round(123124123, -1)) print(round(54213, -2)) # Round is not neccessary for display reasons. use format instead x = 1.8913479812313 print("value is {:0.3f}".format(x))
def get_emails(): while True: email_info = input().split(' ') if email_info[0] == 'Stop': break sender, receiver, content = email_info email = Email(sender, receiver, content) emails.append(email) class Email: def __init__(self, sender, receiver, content): self.sender = sender self.receiver = receiver self.content = content self.is_sent = False def send(self): self.is_sent = True def get_info(self): return f'{self.sender} says to {self.receiver}: {self.content}. Sent: {self.is_sent}' emails = [] get_emails() email_indices = map(int, input().split(', ')) for i in email_indices: emails[i].send() [print(email.get_info()) for email in emails]
pattern_zero=[0.0, 0.017538265306, 0.03443877551, 0.035714285714, 0.050701530612, 0.05325255102, 0.066326530612, 0.070153061224, 0.071428571429, 0.08131377551, 0.086415816327, 0.088966836735, 0.095663265306, 0.102040816327, 0.105867346939, 0.107142857143, 0.109375, 0.117028061224, 0.122130102041, 0.122448979592, 0.124681122449, 0.13137755102, 0.134885204082, 0.137755102041, 0.141581632653, 0.142857142857, 0.145089285714, 0.146683673469, 0.152742346939, 0.157844387755, 0.158163265306, 0.160395408163, 0.167091836735, 0.168367346939, 0.170599489796, 0.173469387755, 0.177295918367, 0.17825255102, 0.178571428571, 0.180803571429, 0.182397959184, 0.1875, 0.188456632653, 0.193558673469, 0.19387755102, 0.196109693878, 0.202806122449, 0.204081632653, 0.20631377551, 0.209183673469, 0.211415816327, 0.213010204082, 0.213966836735, 0.214285714286, 0.216517857143, 0.218112244898, 0.223214285714, 0.224170918367, 0.229272959184, 0.229591836735, 0.231823979592, 0.234375, 0.238520408163, 0.239795918367, 0.242028061224, 0.244897959184, 0.247130102041, 0.248724489796, 0.249681122449, 0.25, 0.252232142857, 0.253826530612, 0.258928571429, 0.259885204082, 0.264987244898, 0.265306122449, 0.267538265306, 0.270089285714, 0.274234693878, 0.275510204082, 0.277742346939, 0.280612244898, 0.282844387755, 0.28443877551, 0.285395408163, 0.285714285714, 0.287946428571, 0.289540816327, 0.294642857143, 0.295599489796, 0.300701530612, 0.301020408163, 0.30325255102, 0.305803571429, 0.309948979592, 0.311224489796, 0.313456632653, 0.316326530612, 0.318558673469, 0.320153061224, 0.321109693878, 0.321428571429, 0.323660714286, 0.325255102041, 0.330357142857, 0.33131377551, 0.336415816327, 0.336734693878, 0.338966836735, 0.341517857143, 0.345663265306, 0.34693877551, 0.349170918367, 0.352040816327, 0.354272959184, 0.355867346939, 0.356823979592, 0.357142857143, 0.359375, 0.360969387755, 0.366071428571, 0.367028061224, 0.372130102041, 0.372448979592, 0.374681122449, 0.377232142857, 0.38137755102, 0.382653061224, 0.384885204082, 0.387755102041, 0.389987244898, 0.391581632653, 0.392538265306, 0.392857142857, 0.395089285714, 0.396683673469, 0.401785714286, 0.402742346939, 0.407844387755, 0.408163265306, 0.410395408163, 0.412946428571, 0.417091836735, 0.418367346939, 0.420599489796, 0.423469387755, 0.425701530612, 0.427295918367, 0.42825255102, 0.428571428571, 0.430803571429, 0.432397959184, 0.4375, 0.438456632653, 0.443558673469, 0.44387755102, 0.446109693878, 0.448660714286, 0.452806122449, 0.454081632653, 0.45631377551, 0.459183673469, 0.461415816327, 0.463010204082, 0.463966836735, 0.464285714286, 0.466517857143, 0.468112244898, 0.473214285714, 0.474170918367, 0.479272959184, 0.479591836735, 0.481823979592, 0.484375, 0.488520408163, 0.489795918367, 0.492028061224, 0.494897959184, 0.497130102041, 0.498724489796, 0.499681122449, 0.5, 0.502232142857, 0.503826530612, 0.508928571429, 0.509885204082, 0.514987244898, 0.515306122449, 0.517538265306, 0.520089285714, 0.524234693878, 0.525510204082, 0.527742346939, 0.530612244898, 0.532844387755, 0.53443877551, 0.535395408163, 0.535714285714, 0.537946428571, 0.539540816327, 0.544642857143, 0.545599489796, 0.550701530612, 0.551020408163, 0.55325255102, 0.555803571429, 0.559948979592, 0.561224489796, 0.563456632653, 0.566326530612, 0.568558673469, 0.570153061224, 0.571109693878, 0.571428571429, 0.573660714286, 0.575255102041, 0.580357142857, 0.58131377551, 0.586415816327, 0.586734693878, 0.588966836735, 0.591517857143, 0.595663265306, 0.59693877551, 0.599170918367, 0.602040816327, 0.604272959184, 0.605867346939, 0.606823979592, 0.607142857143, 0.609375, 0.610969387755, 0.616071428571, 0.617028061224, 0.622130102041, 0.622448979592, 0.624681122449, 0.627232142857, 0.63137755102, 0.632653061224, 0.634885204082, 0.637755102041, 0.639987244898, 0.641581632653, 0.642538265306, 0.642857142857, 0.645089285714, 0.646683673469, 0.651785714286, 0.652742346939, 0.657844387755, 0.658163265306, 0.660395408163, 0.662946428571, 0.667091836735, 0.668367346939, 0.670599489796, 0.673469387755, 0.675701530612, 0.677295918367, 0.67825255102, 0.678571428571, 0.680803571429, 0.682397959184, 0.6875, 0.688456632653, 0.693558673469, 0.69387755102, 0.696109693878, 0.698660714286, 0.702806122449, 0.704081632653, 0.70631377551, 0.709183673469, 0.711415816327, 0.713010204082, 0.713966836735, 0.714285714286, 0.716517857143, 0.718112244898, 0.723214285714, 0.724170918367, 0.729272959184, 0.729591836735, 0.731823979592, 0.734375, 0.738520408163, 0.739795918367, 0.742028061224, 0.744897959184, 0.747130102041, 0.748724489796, 0.749681122449, 0.75, 0.752232142857, 0.753826530612, 0.758928571429, 0.759885204082, 0.764987244898, 0.765306122449, 0.767538265306, 0.770089285714, 0.774234693878, 0.775510204082, 0.777742346939, 0.780612244898, 0.782844387755, 0.78443877551, 0.785395408163, 0.785714285714, 0.787946428571, 0.789540816327, 0.794642857143, 0.795599489796, 0.800701530612, 0.801020408163, 0.80325255102, 0.805803571429, 0.809948979592, 0.811224489796, 0.813456632653, 0.816326530612, 0.818558673469, 0.820153061224, 0.821109693878, 0.821428571429, 0.823660714286, 0.825255102041, 0.830357142857, 0.83131377551, 0.836415816327, 0.836734693878, 0.838966836735, 0.841517857143, 0.845663265306, 0.84693877551, 0.849170918367, 0.852040816327, 0.854272959184, 0.855867346939, 0.856823979592, 0.857142857143, 0.859375, 0.860969387755, 0.866071428571, 0.867028061224, 0.872130102041, 0.872448979592, 0.874681122449, 0.877232142857, 0.88137755102, 0.882653061224, 0.884885204082, 0.887755102041, 0.889987244898, 0.891581632653, 0.892538265306, 0.892857142857, 0.895089285714, 0.896683673469, 0.901785714286, 0.902742346939, 0.907844387755, 0.908163265306, 0.910395408163, 0.912946428571, 0.917091836735, 0.918367346939, 0.920599489796, 0.923469387755, 0.925701530612, 0.927295918367, 0.92825255102, 0.928571428571, 0.930803571429, 0.932397959184, 0.9375, 0.938456632653, 0.943558673469, 0.94387755102, 0.946109693878, 0.948660714286, 0.952806122449, 0.954081632653, 0.95631377551, 0.959183673469, 0.961415816327, 0.963010204082, 0.963966836735, 0.964285714286, 0.966517857143, 0.968112244898, 0.973214285714, 0.974170918367, 0.979272959184, 0.979591836735, 0.981823979592, 0.984375, 0.988520408163, 0.989795918367, 0.992028061224, 0.994897959184, 0.997130102041, 0.998724489796, 0.999681122449] pattern_odd=[0.0, 0.002232142857, 0.003826530612, 0.008928571429, 0.009885204082, 0.014987244898, 0.015306122449, 0.017538265306, 0.020089285714, 0.024234693878, 0.025510204082, 0.027742346939, 0.030612244898, 0.032844387755, 0.03443877551, 0.035395408163, 0.035714285714, 0.037946428571, 0.039540816327, 0.044642857143, 0.045599489796, 0.050701530612, 0.051020408163, 0.05325255102, 0.055803571429, 0.059948979592, 0.061224489796, 0.063456632653, 0.066326530612, 0.068558673469, 0.070153061224, 0.071109693878, 0.071428571429, 0.073660714286, 0.075255102041, 0.080357142857, 0.08131377551, 0.086415816327, 0.086734693878, 0.088966836735, 0.091517857143, 0.095663265306, 0.09693877551, 0.099170918367, 0.102040816327, 0.104272959184, 0.105867346939, 0.106823979592, 0.107142857143, 0.109375, 0.110969387755, 0.116071428571, 0.117028061224, 0.122130102041, 0.122448979592, 0.124681122449, 0.127232142857, 0.13137755102, 0.132653061224, 0.134885204082, 0.137755102041, 0.139987244898, 0.141581632653, 0.142538265306, 0.142857142857, 0.145089285714, 0.146683673469, 0.151785714286, 0.152742346939, 0.157844387755, 0.158163265306, 0.160395408163, 0.162946428571, 0.167091836735, 0.168367346939, 0.170599489796, 0.173469387755, 0.175701530612, 0.177295918367, 0.17825255102, 0.178571428571, 0.180803571429, 0.182397959184, 0.1875, 0.188456632653, 0.193558673469, 0.19387755102, 0.196109693878, 0.198660714286, 0.202806122449, 0.204081632653, 0.20631377551, 0.209183673469, 0.211415816327, 0.213010204082, 0.213966836735, 0.214285714286, 0.216517857143, 0.218112244898, 0.223214285714, 0.224170918367, 0.229272959184, 0.229591836735, 0.231823979592, 0.234375, 0.238520408163, 0.239795918367, 0.242028061224, 0.244897959184, 0.247130102041, 0.248724489796, 0.249681122449, 0.25, 0.252232142857, 0.253826530612, 0.258928571429, 0.259885204082, 0.264987244898, 0.265306122449, 0.267538265306, 0.270089285714, 0.274234693878, 0.275510204082, 0.277742346939, 0.280612244898, 0.282844387755, 0.28443877551, 0.285395408163, 0.285714285714, 0.287946428571, 0.289540816327, 0.294642857143, 0.295599489796, 0.300701530612, 0.301020408163, 0.30325255102, 0.305803571429, 0.309948979592, 0.311224489796, 0.313456632653, 0.316326530612, 0.318558673469, 0.320153061224, 0.321109693878, 0.321428571429, 0.323660714286, 0.325255102041, 0.330357142857, 0.33131377551, 0.336415816327, 0.336734693878, 0.338966836735, 0.341517857143, 0.345663265306, 0.34693877551, 0.349170918367, 0.352040816327, 0.354272959184, 0.355867346939, 0.356823979592, 0.357142857143, 0.359375, 0.360969387755, 0.366071428571, 0.367028061224, 0.372130102041, 0.372448979592, 0.374681122449, 0.377232142857, 0.38137755102, 0.382653061224, 0.384885204082, 0.387755102041, 0.389987244898, 0.391581632653, 0.392538265306, 0.392857142857, 0.395089285714, 0.396683673469, 0.401785714286, 0.402742346939, 0.407844387755, 0.408163265306, 0.410395408163, 0.412946428571, 0.417091836735, 0.418367346939, 0.420599489796, 0.423469387755, 0.425701530612, 0.427295918367, 0.42825255102, 0.428571428571, 0.430803571429, 0.432397959184, 0.4375, 0.438456632653, 0.443558673469, 0.44387755102, 0.446109693878, 0.448660714286, 0.452806122449, 0.454081632653, 0.45631377551, 0.459183673469, 0.461415816327, 0.463010204082, 0.463966836735, 0.464285714286, 0.466517857143, 0.468112244898, 0.473214285714, 0.474170918367, 0.479272959184, 0.479591836735, 0.481823979592, 0.484375, 0.488520408163, 0.489795918367, 0.492028061224, 0.494897959184, 0.497130102041, 0.498724489796, 0.499681122449, 0.5, 0.502232142857, 0.503826530612, 0.508928571429, 0.509885204082, 0.514987244898, 0.515306122449, 0.517538265306, 0.520089285714, 0.524234693878, 0.525510204082, 0.527742346939, 0.530612244898, 0.532844387755, 0.53443877551, 0.535395408163, 0.535714285714, 0.537946428571, 0.539540816327, 0.544642857143, 0.545599489796, 0.550701530612, 0.551020408163, 0.55325255102, 0.555803571429, 0.559948979592, 0.561224489796, 0.563456632653, 0.566326530612, 0.568558673469, 0.570153061224, 0.571109693878, 0.571428571429, 0.573660714286, 0.575255102041, 0.580357142857, 0.58131377551, 0.586415816327, 0.586734693878, 0.588966836735, 0.591517857143, 0.595663265306, 0.59693877551, 0.599170918367, 0.602040816327, 0.604272959184, 0.605867346939, 0.606823979592, 0.607142857143, 0.609375, 0.610969387755, 0.616071428571, 0.617028061224, 0.622130102041, 0.622448979592, 0.624681122449, 0.627232142857, 0.63137755102, 0.632653061224, 0.634885204082, 0.637755102041, 0.639987244898, 0.641581632653, 0.642538265306, 0.642857142857, 0.645089285714, 0.646683673469, 0.651785714286, 0.652742346939, 0.657844387755, 0.658163265306, 0.660395408163, 0.662946428571, 0.667091836735, 0.668367346939, 0.670599489796, 0.673469387755, 0.675701530612, 0.677295918367, 0.67825255102, 0.678571428571, 0.680803571429, 0.682397959184, 0.6875, 0.688456632653, 0.693558673469, 0.69387755102, 0.696109693878, 0.698660714286, 0.702806122449, 0.704081632653, 0.70631377551, 0.709183673469, 0.711415816327, 0.713010204082, 0.713966836735, 0.714285714286, 0.716517857143, 0.718112244898, 0.723214285714, 0.724170918367, 0.729272959184, 0.729591836735, 0.731823979592, 0.734375, 0.738520408163, 0.739795918367, 0.742028061224, 0.744897959184, 0.747130102041, 0.748724489796, 0.749681122449, 0.75, 0.752232142857, 0.753826530612, 0.758928571429, 0.759885204082, 0.764987244898, 0.765306122449, 0.767538265306, 0.770089285714, 0.774234693878, 0.775510204082, 0.777742346939, 0.780612244898, 0.782844387755, 0.78443877551, 0.785395408163, 0.785714285714, 0.787946428571, 0.789540816327, 0.794642857143, 0.795599489796, 0.800701530612, 0.801020408163, 0.80325255102, 0.805803571429, 0.809948979592, 0.811224489796, 0.813456632653, 0.816326530612, 0.818558673469, 0.820153061224, 0.821109693878, 0.821428571429, 0.823660714286, 0.825255102041, 0.830357142857, 0.83131377551, 0.836415816327, 0.836734693878, 0.838966836735, 0.841517857143, 0.845663265306, 0.84693877551, 0.849170918367, 0.852040816327, 0.854272959184, 0.855867346939, 0.856823979592, 0.857142857143, 0.859375, 0.860969387755, 0.866071428571, 0.867028061224, 0.872130102041, 0.872448979592, 0.874681122449, 0.877232142857, 0.88137755102, 0.882653061224, 0.884885204082, 0.887755102041, 0.889987244898, 0.891581632653, 0.892538265306, 0.892857142857, 0.895089285714, 0.896683673469, 0.901785714286, 0.902742346939, 0.907844387755, 0.908163265306, 0.910395408163, 0.912946428571, 0.917091836735, 0.918367346939, 0.920599489796, 0.923469387755, 0.925701530612, 0.927295918367, 0.92825255102, 0.928571428571, 0.930803571429, 0.932397959184, 0.9375, 0.938456632653, 0.943558673469, 0.94387755102, 0.946109693878, 0.948660714286, 0.952806122449, 0.954081632653, 0.95631377551, 0.959183673469, 0.961415816327, 0.963010204082, 0.963966836735, 0.964285714286, 0.966517857143, 0.968112244898, 0.973214285714, 0.974170918367, 0.979272959184, 0.979591836735, 0.981823979592, 0.984375, 0.988520408163, 0.989795918367, 0.992028061224, 0.994897959184, 0.997130102041, 0.998724489796, 0.999681122449] pattern_even=[0.0, 0.002232142857, 0.003826530612, 0.008928571429, 0.009885204082, 0.014987244898, 0.015306122449, 0.017538265306, 0.020089285714, 0.024234693878, 0.025510204082, 0.027742346939, 0.030612244898, 0.032844387755, 0.03443877551, 0.035395408163, 0.035714285714, 0.037946428571, 0.039540816327, 0.044642857143, 0.045599489796, 0.050701530612, 0.051020408163, 0.05325255102, 0.055803571429, 0.059948979592, 0.061224489796, 0.063456632653, 0.066326530612, 0.068558673469, 0.070153061224, 0.071109693878, 0.071428571429, 0.073660714286, 0.075255102041, 0.080357142857, 0.08131377551, 0.086415816327, 0.086734693878, 0.088966836735, 0.091517857143, 0.095663265306, 0.09693877551, 0.099170918367, 0.102040816327, 0.104272959184, 0.105867346939, 0.106823979592, 0.107142857143, 0.109375, 0.110969387755, 0.116071428571, 0.117028061224, 0.122130102041, 0.122448979592, 0.124681122449, 0.127232142857, 0.13137755102, 0.132653061224, 0.134885204082, 0.137755102041, 0.139987244898, 0.141581632653, 0.142538265306, 0.142857142857, 0.145089285714, 0.146683673469, 0.151785714286, 0.152742346939, 0.157844387755, 0.158163265306, 0.160395408163, 0.162946428571, 0.167091836735, 0.168367346939, 0.170599489796, 0.173469387755, 0.175701530612, 0.177295918367, 0.17825255102, 0.178571428571, 0.180803571429, 0.182397959184, 0.1875, 0.188456632653, 0.193558673469, 0.19387755102, 0.196109693878, 0.198660714286, 0.202806122449, 0.204081632653, 0.20631377551, 0.209183673469, 0.211415816327, 0.213010204082, 0.213966836735, 0.214285714286, 0.216517857143, 0.218112244898, 0.223214285714, 0.224170918367, 0.229272959184, 0.229591836735, 0.231823979592, 0.234375, 0.238520408163, 0.239795918367, 0.242028061224, 0.244897959184, 0.247130102041, 0.248724489796, 0.249681122449, 0.25, 0.252232142857, 0.253826530612, 0.258928571429, 0.259885204082, 0.264987244898, 0.265306122449, 0.267538265306, 0.270089285714, 0.274234693878, 0.275510204082, 0.277742346939, 0.280612244898, 0.282844387755, 0.28443877551, 0.285395408163, 0.285714285714, 0.287946428571, 0.289540816327, 0.294642857143, 0.295599489796, 0.300701530612, 0.301020408163, 0.30325255102, 0.305803571429, 0.309948979592, 0.311224489796, 0.313456632653, 0.316326530612, 0.318558673469, 0.320153061224, 0.321109693878, 0.321428571429, 0.323660714286, 0.325255102041, 0.330357142857, 0.33131377551, 0.336415816327, 0.336734693878, 0.338966836735, 0.341517857143, 0.345663265306, 0.34693877551, 0.349170918367, 0.352040816327, 0.354272959184, 0.355867346939, 0.356823979592, 0.357142857143, 0.359375, 0.360969387755, 0.366071428571, 0.367028061224, 0.372130102041, 0.372448979592, 0.374681122449, 0.377232142857, 0.38137755102, 0.382653061224, 0.384885204082, 0.387755102041, 0.389987244898, 0.391581632653, 0.392538265306, 0.392857142857, 0.395089285714, 0.396683673469, 0.401785714286, 0.402742346939, 0.407844387755, 0.408163265306, 0.410395408163, 0.412946428571, 0.417091836735, 0.418367346939, 0.420599489796, 0.423469387755, 0.425701530612, 0.427295918367, 0.42825255102, 0.428571428571, 0.430803571429, 0.432397959184, 0.4375, 0.438456632653, 0.443558673469, 0.44387755102, 0.446109693878, 0.448660714286, 0.452806122449, 0.454081632653, 0.45631377551, 0.459183673469, 0.461415816327, 0.463010204082, 0.463966836735, 0.464285714286, 0.466517857143, 0.468112244898, 0.473214285714, 0.474170918367, 0.479272959184, 0.479591836735, 0.481823979592, 0.484375, 0.488520408163, 0.489795918367, 0.492028061224, 0.494897959184, 0.497130102041, 0.498724489796, 0.499681122449, 0.5, 0.502232142857, 0.503826530612, 0.508928571429, 0.509885204082, 0.514987244898, 0.515306122449, 0.517538265306, 0.520089285714, 0.524234693878, 0.525510204082, 0.527742346939, 0.530612244898, 0.532844387755, 0.53443877551, 0.535395408163, 0.535714285714, 0.537946428571, 0.539540816327, 0.544642857143, 0.545599489796, 0.550701530612, 0.551020408163, 0.55325255102, 0.555803571429, 0.559948979592, 0.561224489796, 0.563456632653, 0.566326530612, 0.568558673469, 0.570153061224, 0.571109693878, 0.571428571429, 0.573660714286, 0.575255102041, 0.580357142857, 0.58131377551, 0.586415816327, 0.586734693878, 0.588966836735, 0.591517857143, 0.595663265306, 0.59693877551, 0.599170918367, 0.602040816327, 0.604272959184, 0.605867346939, 0.606823979592, 0.607142857143, 0.609375, 0.610969387755, 0.616071428571, 0.617028061224, 0.622130102041, 0.622448979592, 0.624681122449, 0.627232142857, 0.63137755102, 0.632653061224, 0.634885204082, 0.637755102041, 0.639987244898, 0.641581632653, 0.642538265306, 0.642857142857, 0.645089285714, 0.646683673469, 0.651785714286, 0.652742346939, 0.657844387755, 0.658163265306, 0.660395408163, 0.662946428571, 0.667091836735, 0.668367346939, 0.670599489796, 0.673469387755, 0.675701530612, 0.677295918367, 0.67825255102, 0.678571428571, 0.680803571429, 0.682397959184, 0.6875, 0.688456632653, 0.693558673469, 0.69387755102, 0.696109693878, 0.698660714286, 0.702806122449, 0.704081632653, 0.70631377551, 0.709183673469, 0.711415816327, 0.713010204082, 0.713966836735, 0.714285714286, 0.716517857143, 0.718112244898, 0.723214285714, 0.724170918367, 0.729272959184, 0.729591836735, 0.731823979592, 0.734375, 0.738520408163, 0.739795918367, 0.742028061224, 0.744897959184, 0.747130102041, 0.748724489796, 0.749681122449, 0.75, 0.752232142857, 0.753826530612, 0.758928571429, 0.759885204082, 0.764987244898, 0.765306122449, 0.767538265306, 0.770089285714, 0.774234693878, 0.775510204082, 0.777742346939, 0.780612244898, 0.782844387755, 0.78443877551, 0.785395408163, 0.785714285714, 0.787946428571, 0.789540816327, 0.794642857143, 0.795599489796, 0.800701530612, 0.801020408163, 0.80325255102, 0.805803571429, 0.809948979592, 0.811224489796, 0.813456632653, 0.816326530612, 0.818558673469, 0.820153061224, 0.821109693878, 0.821428571429, 0.823660714286, 0.825255102041, 0.830357142857, 0.83131377551, 0.836415816327, 0.836734693878, 0.838966836735, 0.841517857143, 0.845663265306, 0.84693877551, 0.849170918367, 0.852040816327, 0.854272959184, 0.855867346939, 0.856823979592, 0.857142857143, 0.859375, 0.860969387755, 0.866071428571, 0.867028061224, 0.872130102041, 0.872448979592, 0.874681122449, 0.877232142857, 0.88137755102, 0.882653061224, 0.884885204082, 0.887755102041, 0.889987244898, 0.891581632653, 0.892538265306, 0.892857142857, 0.895089285714, 0.896683673469, 0.901785714286, 0.902742346939, 0.907844387755, 0.908163265306, 0.910395408163, 0.912946428571, 0.917091836735, 0.918367346939, 0.920599489796, 0.923469387755, 0.925701530612, 0.927295918367, 0.92825255102, 0.928571428571, 0.930803571429, 0.932397959184, 0.9375, 0.938456632653, 0.943558673469, 0.94387755102, 0.946109693878, 0.948660714286, 0.952806122449, 0.954081632653, 0.95631377551, 0.959183673469, 0.961415816327, 0.963010204082, 0.963966836735, 0.964285714286, 0.966517857143, 0.968112244898, 0.973214285714, 0.974170918367, 0.979272959184, 0.979591836735, 0.981823979592, 0.984375, 0.988520408163, 0.989795918367, 0.992028061224, 0.994897959184, 0.997130102041, 0.998724489796, 0.999681122449] averages_even={0.0: [0.5, 0.0], 0.109375: [0.875, 0.125], 0.1875: [0.25, 0.75], 0.392857142857: [0.5, 0.0], 0.127232142857: [0.375, 0.625], 0.188456632653: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.209183673469: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.744897959184: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.856823979592: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.5: [0.5, 0.0], 0.946109693878: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.657844387755: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.03443877551: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.244897959184: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.354272959184: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.535714285714: [0.5, 0.0], 0.473214285714: [0.75, 0.25], 0.78443877551: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.753826530612: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.59693877551: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.537946428571: [0.875, 0.125], 0.813456632653: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.780612244898: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.015306122449: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.488520408163: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.999681122449: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.559948979592: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.382653061224: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.651785714286: [0.75, 0.25], 0.009885204082: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.823660714286: [0.875, 0.125], 0.6875: [0.75, 0.25], 0.412946428571: [0.375, 0.625], 0.882653061224: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.502232142857: [0.875, 0.125], 0.270089285714: [0.375, 0.625], 0.08131377551: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.75: [0.5, 0.0], 0.104272959184: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.973214285714: [0.75, 0.25], 0.443558673469: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.713010204082: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.253826530612: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.887755102041: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.035714285714: [0.5, 0.0], 0.287946428571: [0.875, 0.125], 0.142538265306: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.892857142857: [0.5, 0.0], 0.238520408163: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.345663265306: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.561224489796: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.680803571429: [0.875, 0.125], 0.177295918367: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.988520408163: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.259885204082: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.454081632653: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.45631377551: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.377232142857: [0.375, 0.625], 0.19387755102: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.580357142857: [0.75, 0.25], 0.742028061224: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.032844387755: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.981823979592: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.357142857143: [0.5, 0.0], 0.645089285714: [0.875, 0.125], 0.468112244898: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.425701530612: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.277742346939: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.122448979592: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.535395408163: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.258928571429: [0.25, 0.75], 0.086415816327: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.588966836735: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.372448979592: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.938456632653: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.867028061224: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.355867346939: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.366071428571: [0.75, 0.25], 0.294642857143: [0.25, 0.75], 0.713966836735: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.464285714286: [0.5, 0.0], 0.017538265306: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.313456632653: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.738520408163: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.854272959184: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.606823979592: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.675701530612: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.948660714286: [0.375, 0.625], 0.389987244898: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.020089285714: [0.375, 0.625], 0.67825255102: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.384885204082: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.359375: [0.875, 0.125], 0.265306122449: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.770089285714: [0.375, 0.625], 0.099170918367: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.575255102041: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.289540816327: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.395089285714: [0.875, 0.125], 0.917091836735: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.821428571429: [0.5, 0.0], 0.658163265306: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.927295918367: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.178571428571: [0.5, 0.0], 0.670599489796: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.352040816327: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.311224489796: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.014987244898: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.213010204082: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.729272959184: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.709183673469: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.071109693878: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.229272959184: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.604272959184: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.09693877551: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.821109693878: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.338966836735: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.461415816327: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.652742346939: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.723214285714: [0.75, 0.25], 0.231823979592: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.066326530612: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.55325255102: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.275510204082: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.452806122449: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.157844387755: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.989795918367: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.002232142857: [0.875, 0.125], 0.624681122449: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.336734693878: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.489795918367: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.84693877551: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.05325255102: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.63137755102: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.800701530612: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.525510204082: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.420599489796: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.039540816327: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.9375: [0.75, 0.25], 0.678571428571: [0.5, 0.0], 0.080357142857: [0.25, 0.75], 0.151785714286: [0.25, 0.75], 0.866071428571: [0.75, 0.25], 0.80325255102: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.320153061224: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.198660714286: [0.375, 0.625], 0.202806122449: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.627232142857: [0.375, 0.625], 0.774234693878: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.479591836735: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.739795918367: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.563456632653: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.891581632653: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.497130102041: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.545599489796: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.162946428571: [0.375, 0.625], 0.908163265306: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.711415816327: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.050701530612: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.896683673469: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.860969387755: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.902742346939: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.765306122449: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.282844387755: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.463966836735: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.356823979592: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.360969387755: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.702806122449: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.794642857143: [0.75, 0.25], 0.830357142857: [0.75, 0.25], 0.928571428571: [0.5, 0.0], 0.923469387755: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.204081632653: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.918367346939: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.677295918367: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.401785714286: [0.75, 0.25], 0.146683673469: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.025510204082: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.836734693878: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.747130102041: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.38137755102: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.063456632653: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.855867346939: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.418367346939: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.168367346939: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.474170918367: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.239795918367: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.196109693878: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.752232142857: [0.875, 0.125], 0.825255102041: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.789540816327: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.816326530612: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.106823979592: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.075255102041: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.027742346939: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.550701530612: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.17825255102: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.402742346939: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.503826530612: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.508928571429: [0.75, 0.25], 0.92825255102: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.595663265306: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.341517857143: [0.375, 0.625], 0.318558673469: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.213966836735: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.423469387755: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.374681122449: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.809948979592: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.599170918367: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.716517857143: [0.875, 0.125], 0.943558673469: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.035395408163: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.438456632653: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.295599489796: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.994897959184: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.145089285714: [0.875, 0.125], 0.729591836735: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.609375: [0.875, 0.125], 0.229591836735: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.494897959184: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.309948979592: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.857142857143: [0.5, 0.0], 0.4375: [0.75, 0.25], 0.852040816327: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.484375: [0.375, 0.625], 0.895089285714: [0.875, 0.125], 0.524234693878: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.158163265306: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.642857142857: [0.5, 0.0], 0.321109693878: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.952806122449: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.285714285714: [0.5, 0.0], 0.408163265306: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.660395408163: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.966517857143: [0.875, 0.125], 0.872448979592: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.070153061224: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.141581632653: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.446109693878: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.998724489796: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.330357142857: [0.75, 0.25], 0.44387755102: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.008928571429: [0.25, 0.75], 0.910395408163: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.968112244898: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.83131377551: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.105867346939: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.963010204082: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.764987244898: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.805803571429: [0.625, 0.375], 0.030612244898: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.305803571429: [0.375, 0.625], 0.134885204082: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.731823979592: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.573660714286: [0.875, 0.125], 0.591517857143: [0.375, 0.625], 0.055803571429: [0.375, 0.625], 0.142857142857: [0.5, 0.0], 0.13137755102: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.734375: [0.375, 0.625], 0.28443877551: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.059948979592: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.170599489796: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.872130102041: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.068558673469: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.110969387755: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.718112244898: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.877232142857: [0.375, 0.625], 0.264987244898: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.173469387755: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.336415816327: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.795599489796: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.073660714286: [0.875, 0.125], 0.801020408163: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.704081632653: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.285395408163: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.137755102041: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.30325255102: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.300701530612: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.874681122449: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.095663265306: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.061224489796: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.838966836735: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.387755102041: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.044642857143: [0.25, 0.75], 0.180803571429: [0.875, 0.125], 0.901785714286: [0.75, 0.25], 0.696109693878: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.223214285714: [0.75, 0.25], 0.463010204082: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.051020408163: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.20631377551: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.182397959184: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.224170918367: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.193558673469: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.820153061224: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.53443877551: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.107142857143: [0.5, 0.0], 0.992028061224: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.748724489796: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.132653061224: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.954081632653: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.961415816327: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.124681122449: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.247130102041: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.566326530612: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.242028061224: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.167091836735: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.698660714286: [0.375, 0.625], 0.641581632653: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.845663265306: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.69387755102: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.515306122449: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.785714285714: [0.5, 0.0], 0.964285714286: [0.5, 0.0], 0.527742346939: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.639987244898: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.997130102041: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.139987244898: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.116071428571: [0.25, 0.75], 0.071428571429: [0.5, 0.0], 0.634885204082: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.767538265306: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.391581632653: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.642538265306: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.811224489796: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.417091836735: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.920599489796: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.122130102041: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.859375: [0.875, 0.125], 0.932397959184: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.622448979592: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.252232142857: [0.875, 0.125], 0.724170918367: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.787946428571: [0.875, 0.125], 0.782844387755: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.551020408163: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.586734693878: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.396683673469: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.963966836735: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.479272959184: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.514987244898: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.34693877551: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.428571428571: [0.5, 0.0], 0.974170918367: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.249681122449: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.216517857143: [0.875, 0.125], 0.925701530612: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.979591836735: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.530612244898: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.33131377551: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.884885204082: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.367028061224: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.539540816327: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.152742346939: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.602040816327: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.775510204082: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.372130102041: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.979272959184: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.617028061224: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.492028061224: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.607142857143: [0.5, 0.0], 0.662946428571: [0.375, 0.625], 0.321428571429: [0.5, 0.0], 0.605867346939: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.325255102041: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.930803571429: [0.875, 0.125], 0.175701530612: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.610969387755: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.091517857143: [0.375, 0.625], 0.759885204082: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.616071428571: [0.75, 0.25], 0.410395408163: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.892538265306: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.849170918367: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.688456632653: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.160395408163: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.520089285714: [0.375, 0.625], 0.466517857143: [0.875, 0.125], 0.117028061224: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.818558673469: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.984375: [0.625, 0.375], 0.509885204082: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.498724489796: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.045599489796: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.912946428571: [0.625, 0.375], 0.481823979592: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.407844387755: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.907844387755: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.749681122449: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.785395408163: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.568558673469: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.682397959184: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.58131377551: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.088966836735: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.841517857143: [0.375, 0.625], 0.430803571429: [0.875, 0.125], 0.024234693878: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.70631377551: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.037946428571: [0.875, 0.125], 0.632653061224: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.218112244898: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.086734693878: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.349170918367: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.88137755102: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.392538265306: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.570153061224: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.777742346939: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.95631377551: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.532844387755: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.323660714286: [0.875, 0.125], 0.499681122449: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.316326530612: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.544642857143: [0.75, 0.25], 0.622130102041: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.586415816327: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.673469387755: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.274234693878: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.427295918367: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.637755102041: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.102040816327: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.758928571429: [0.75, 0.25], 0.267538265306: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.555803571429: [0.375, 0.625], 0.211415816327: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.714285714286: [0.5, 0.0], 0.459183673469: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.889987244898: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.448660714286: [0.375, 0.625], 0.571109693878: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.667091836735: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.94387755102: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.432397959184: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.571428571429: [0.5, 0.0], 0.214285714286: [0.5, 0.0], 0.42825255102: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.280612244898: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.693558673469: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.646683673469: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.248724489796: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.234375: [0.375, 0.625], 0.836415816327: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.25: [0.5, 0.0], 0.959183673469: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.003826530612: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.668367346939: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.517538265306: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.301020408163: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429]} averages_odd={0.0: [0.5, 0.0], 0.109375: [0.875, 0.125], 0.1875: [0.25, 0.75], 0.392857142857: [0.5, 0.0], 0.127232142857: [0.375, 0.625], 0.188456632653: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.209183673469: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.744897959184: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.856823979592: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.5: [0.5, 0.0], 0.946109693878: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.657844387755: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.03443877551: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.244897959184: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.354272959184: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.535714285714: [0.5, 0.0], 0.473214285714: [0.75, 0.25], 0.78443877551: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.753826530612: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.59693877551: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.537946428571: [0.875, 0.125], 0.813456632653: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.780612244898: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.015306122449: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.488520408163: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.999681122449: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.559948979592: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.382653061224: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.651785714286: [0.75, 0.25], 0.009885204082: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.823660714286: [0.875, 0.125], 0.6875: [0.75, 0.25], 0.412946428571: [0.375, 0.625], 0.882653061224: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.502232142857: [0.875, 0.125], 0.270089285714: [0.375, 0.625], 0.08131377551: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.75: [0.5, 0.0], 0.104272959184: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.973214285714: [0.75, 0.25], 0.443558673469: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.713010204082: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.253826530612: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.887755102041: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.035714285714: [0.5, 0.0], 0.287946428571: [0.875, 0.125], 0.142538265306: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.892857142857: [0.5, 0.0], 0.238520408163: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.345663265306: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.561224489796: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.680803571429: [0.875, 0.125], 0.177295918367: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.988520408163: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.259885204082: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.454081632653: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.45631377551: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.377232142857: [0.375, 0.625], 0.19387755102: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.580357142857: [0.75, 0.25], 0.742028061224: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.032844387755: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.981823979592: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.357142857143: [0.5, 0.0], 0.645089285714: [0.875, 0.125], 0.468112244898: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.425701530612: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.277742346939: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.122448979592: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.535395408163: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.258928571429: [0.25, 0.75], 0.086415816327: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.588966836735: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.372448979592: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.938456632653: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.867028061224: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.355867346939: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.366071428571: [0.75, 0.25], 0.294642857143: [0.25, 0.75], 0.713966836735: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.464285714286: [0.5, 0.0], 0.017538265306: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.313456632653: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.738520408163: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.854272959184: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.606823979592: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.675701530612: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.948660714286: [0.375, 0.625], 0.389987244898: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.020089285714: [0.375, 0.625], 0.67825255102: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.384885204082: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.359375: [0.875, 0.125], 0.265306122449: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.770089285714: [0.375, 0.625], 0.099170918367: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.575255102041: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.289540816327: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.395089285714: [0.875, 0.125], 0.917091836735: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.821428571429: [0.5, 0.0], 0.658163265306: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.927295918367: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.178571428571: [0.5, 0.0], 0.670599489796: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.352040816327: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.311224489796: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.014987244898: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.213010204082: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.729272959184: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.709183673469: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.071109693878: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.229272959184: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.604272959184: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.09693877551: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.821109693878: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.338966836735: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.461415816327: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.652742346939: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.723214285714: [0.75, 0.25], 0.231823979592: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.066326530612: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.55325255102: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.275510204082: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.452806122449: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.157844387755: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.989795918367: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.002232142857: [0.875, 0.125], 0.624681122449: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.336734693878: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.489795918367: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.84693877551: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.05325255102: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.63137755102: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.800701530612: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.525510204082: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.420599489796: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.039540816327: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.9375: [0.75, 0.25], 0.678571428571: [0.5, 0.0], 0.080357142857: [0.25, 0.75], 0.151785714286: [0.25, 0.75], 0.866071428571: [0.75, 0.25], 0.80325255102: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.320153061224: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.198660714286: [0.375, 0.625], 0.202806122449: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.627232142857: [0.375, 0.625], 0.774234693878: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.479591836735: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.739795918367: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.563456632653: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.891581632653: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.497130102041: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.545599489796: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.162946428571: [0.375, 0.625], 0.908163265306: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.711415816327: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.050701530612: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.896683673469: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.860969387755: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.902742346939: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.765306122449: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.282844387755: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.463966836735: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.356823979592: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.360969387755: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.702806122449: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.794642857143: [0.75, 0.25], 0.830357142857: [0.75, 0.25], 0.928571428571: [0.5, 0.0], 0.923469387755: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.204081632653: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.918367346939: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.677295918367: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.401785714286: [0.75, 0.25], 0.146683673469: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.025510204082: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.836734693878: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.747130102041: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.38137755102: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.063456632653: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.855867346939: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.418367346939: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.168367346939: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.474170918367: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.239795918367: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.196109693878: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.752232142857: [0.875, 0.125], 0.825255102041: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.789540816327: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.816326530612: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.106823979592: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.075255102041: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.027742346939: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.550701530612: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.17825255102: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.402742346939: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.503826530612: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.508928571429: [0.75, 0.25], 0.92825255102: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.595663265306: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.341517857143: [0.375, 0.625], 0.318558673469: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.213966836735: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.423469387755: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.374681122449: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.809948979592: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.599170918367: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.716517857143: [0.875, 0.125], 0.943558673469: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.035395408163: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.438456632653: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.295599489796: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.994897959184: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.145089285714: [0.875, 0.125], 0.729591836735: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.609375: [0.875, 0.125], 0.229591836735: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.494897959184: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.309948979592: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.857142857143: [0.5, 0.0], 0.4375: [0.75, 0.25], 0.852040816327: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.484375: [0.375, 0.625], 0.895089285714: [0.875, 0.125], 0.524234693878: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.158163265306: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.642857142857: [0.5, 0.0], 0.321109693878: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.952806122449: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.285714285714: [0.5, 0.0], 0.408163265306: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.660395408163: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.966517857143: [0.875, 0.125], 0.872448979592: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.070153061224: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.141581632653: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.446109693878: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.998724489796: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.330357142857: [0.75, 0.25], 0.44387755102: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.008928571429: [0.25, 0.75], 0.910395408163: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.968112244898: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.83131377551: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.105867346939: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.963010204082: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.764987244898: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.805803571429: [0.625, 0.375], 0.030612244898: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.305803571429: [0.375, 0.625], 0.134885204082: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.731823979592: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.573660714286: [0.875, 0.125], 0.591517857143: [0.375, 0.625], 0.055803571429: [0.375, 0.625], 0.142857142857: [0.5, 0.0], 0.13137755102: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.734375: [0.375, 0.625], 0.28443877551: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.059948979592: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.170599489796: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.872130102041: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.068558673469: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.110969387755: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.718112244898: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.877232142857: [0.375, 0.625], 0.264987244898: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.173469387755: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.336415816327: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.795599489796: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.073660714286: [0.875, 0.125], 0.801020408163: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.704081632653: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.285395408163: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.137755102041: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.30325255102: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.300701530612: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.874681122449: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.095663265306: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.061224489796: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.838966836735: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.387755102041: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.044642857143: [0.25, 0.75], 0.180803571429: [0.875, 0.125], 0.901785714286: [0.75, 0.25], 0.696109693878: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.223214285714: [0.75, 0.25], 0.463010204082: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.051020408163: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.20631377551: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.182397959184: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.224170918367: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.193558673469: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.820153061224: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.53443877551: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.107142857143: [0.5, 0.0], 0.992028061224: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.748724489796: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.132653061224: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.954081632653: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.961415816327: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.124681122449: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.247130102041: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.566326530612: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.242028061224: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.167091836735: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.698660714286: [0.375, 0.625], 0.641581632653: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.845663265306: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.69387755102: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.515306122449: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.785714285714: [0.5, 0.0], 0.964285714286: [0.5, 0.0], 0.527742346939: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.639987244898: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.997130102041: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.139987244898: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.116071428571: [0.25, 0.75], 0.071428571429: [0.5, 0.0], 0.634885204082: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.767538265306: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.391581632653: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.642538265306: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.811224489796: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.417091836735: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.920599489796: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.122130102041: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.859375: [0.875, 0.125], 0.932397959184: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.622448979592: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.252232142857: [0.875, 0.125], 0.724170918367: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.787946428571: [0.875, 0.125], 0.782844387755: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.551020408163: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.586734693878: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.396683673469: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.963966836735: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.479272959184: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.514987244898: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.34693877551: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.428571428571: [0.5, 0.0], 0.974170918367: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.249681122449: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.216517857143: [0.875, 0.125], 0.925701530612: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.979591836735: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.530612244898: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.33131377551: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.884885204082: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.367028061224: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.539540816327: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.152742346939: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.602040816327: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.775510204082: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.372130102041: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.979272959184: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.617028061224: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.492028061224: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.607142857143: [0.5, 0.0], 0.662946428571: [0.375, 0.625], 0.321428571429: [0.5, 0.0], 0.605867346939: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.325255102041: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.930803571429: [0.875, 0.125], 0.175701530612: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.610969387755: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.091517857143: [0.375, 0.625], 0.759885204082: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.616071428571: [0.75, 0.25], 0.410395408163: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.892538265306: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.849170918367: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.688456632653: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.160395408163: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.520089285714: [0.375, 0.625], 0.466517857143: [0.875, 0.125], 0.117028061224: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.818558673469: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.984375: [0.625, 0.375], 0.509885204082: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.498724489796: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.045599489796: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.912946428571: [0.625, 0.375], 0.481823979592: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.407844387755: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.907844387755: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.749681122449: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.785395408163: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.568558673469: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.682397959184: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.58131377551: [0.9107142857143, 0.0892857142857, 0.6607142857143, 0.3392857142857], 0.088966836735: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.841517857143: [0.375, 0.625], 0.430803571429: [0.875, 0.125], 0.024234693878: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.70631377551: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.037946428571: [0.875, 0.125], 0.632653061224: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.218112244898: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.086734693878: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.349170918367: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.88137755102: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.392538265306: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.570153061224: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.777742346939: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.95631377551: [0.4107142857143, 0.1607142857143, 0.5892857142857, 0.8392857142857], 0.532844387755: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.323660714286: [0.875, 0.125], 0.499681122449: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.316326530612: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.544642857143: [0.75, 0.25], 0.622130102041: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.586415816327: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.673469387755: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.274234693878: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.427295918367: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.637755102041: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.102040816327: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.758928571429: [0.75, 0.25], 0.267538265306: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.555803571429: [0.375, 0.625], 0.211415816327: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.714285714286: [0.5, 0.0], 0.459183673469: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.889987244898: [0.6964285714286, 0.4464285714286, 0.3035714285714, 0.5535714285714], 0.448660714286: [0.375, 0.625], 0.571109693878: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.667091836735: [0.8928571428571, 0.3928571428571, 0.6071428571429, 0.1071428571429], 0.94387755102: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429], 0.432397959184: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.571428571429: [0.5, 0.0], 0.214285714286: [0.5, 0.0], 0.42825255102: [0.5178571428571, 0.4821428571429, 0.7678571428571, 0.2321428571429], 0.280612244898: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.693558673469: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.646683673469: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.248724489796: [0.0357142857143, 0.9642857142857, 0.5357142857143, 0.4642857142857], 0.234375: [0.375, 0.625], 0.836415816327: [0.9464285714286, 0.1964285714286, 0.0535714285714, 0.8035714285714], 0.25: [0.5, 0.0], 0.959183673469: [0.5714285714286, 0.4285714285714, 0.9285714285714, 0.0714285714286], 0.003826530612: [0.8214285714286, 0.3214285714286, 0.1785714285714, 0.6785714285714], 0.668367346939: [0.2857142857143, 0.7142857142857, 0.7857142857143, 0.2142857142857], 0.517538265306: [0.0178571428571, 0.2678571428571, 0.7321428571429, 0.9821428571429], 0.301020408163: [0.1428571428571, 0.6428571428571, 0.3571428571429, 0.8571428571429]}
def main() -> None: x0, y0, x1, y1 = map(int, input().split()) for dx in range(-2, 3): for dy in range(-2, 3): if abs(dx) + abs(dy) != 3: continue if abs(dx) == 0 or abs(dy) == 0: continue x = x0 + dx y = y0 + dy dx = abs(x1 - x) dy = abs(y1 - y) if abs(dx) + abs(dy) != 3: continue if abs(dx) == 0 or abs(dy) == 0: continue print("Yes") return print("No") if __name__ == "__main__": main()
# Copyright (c) 2010 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # This file was split off from ppapi.gyp to prevent PPAPI users from # needing to DEPS in ~10K files due to mesa. { 'includes': [ '../../../third_party/mesa/mesa.gypi', ], 'variables': { 'chromium_code': 1, # Use higher warning level. }, 'targets': [ { 'target_name': 'ppapi_egl', 'type': 'static_library', 'dependencies': [ '<(DEPTH)/ppapi/ppapi.gyp:ppapi_c', ], 'include_dirs': [ 'include', ], 'defines': [ # Do not export internal Mesa funcations. Exporting them is not # required because we are compiling both - API dispatcher and driver # into a single library. 'PUBLIC=', # Define a new PPAPI platform. '_EGL_PLATFORM_PPAPI=_EGL_NUM_PLATFORMS', '_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_PPAPI', ], 'conditions': [ ['OS=="win"', { 'defines': [ '_EGL_OS_WINDOWS', ], }], ['OS=="mac"', { # TODO(alokp): Make this compile on mac. 'suppress_wildcard': 1, }], ], 'sources': [ # Mesa EGL API dispatcher sources. '<@(mesa_egl_sources)', # PPAPI EGL driver sources. 'egl/egldriver.c', 'egl/egldriver_ppapi.c', ], }, ], }
# 5658. Maximum Absolute Sum of Any Subarray # Biweekly contest 45 class Solution: def maxAbsoluteSum(self, nums: List[int]) -> int: currentmax = globalmax = currentmin = nums[0] for i in range(1, len(nums)): x, y = nums[i] + currentmax, nums[i] + currentmin currentmax = max(nums[i], x, y) currentmin = min(nums[i], x, y) globalmax = max(globalmax, abs(currentmax), abs(currentmin)) return globalmax
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. def capital_checker(dicti): correct_ans = {"New York": "Albany", "California": "Sacramento", "New Mexico": "Santa Fe", "Florida": "Tallahassee", "Michigan": "Lansing"} return_dict = {} for keys,values in dicti.items(): if values.lower() != correct_ans[keys].lower(): return_dict[keys] = "Incorrect" else: return_dict[keys] = "Correct" return return_dict
# -*- coding: utf8 -*- def get_zero_matrix(size): # ''' # Input: # - size : 정수형 값 # Output: # - size * size 크기의 two dimensional list를 반환함 # - list내 모든 값은 다 0으로 입력되어 있음 # Examples: # >>> import magic_square as ms # >>> ms.get_zero_matrix(3) # [[0, 0, 0], [0, 0, 0], [0, 0, 0]] # >>> ms.get_zero_matrix(4) # [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]] # >>> base_matrix = ms.get_zero_matrix(4) # >>> base_matrix[0][0] = 1 # >>> base_matrix # [[1, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]] # >>> base_matrix = ms.get_zero_matrix(7) # >>> base_matrix # [[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, # 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]] # ''' base_matrix = [] # ===Modify codes below============= # ================================== return base_matrix def is_validate_number(user_input): # ''' # Input: # - user_input : 문자열 # Output: # - 입력된 문자열이 정수형 문자열이며, 3보다 크고 20보다 작을 경우는 True # 그렇지 않을 경우에는 False를 반환함 # Examples: # >>> import magic_square as ms # >>> ms.is_validate_number("10") # True # >>> ms.is_validate_number("abc") # False # >>> ms.is_validate_number("1111") # False # >>> ms.is_validate_number("10.5") # False # >>> ms.is_validate_number("3") # True # >>> ms.is_validate_number("2") # False # >>> ms.is_validate_number("1") # False # ''' result = None # ===Modify codes below============= # ================================= return result def is_4even_number(size): # ''' # Input: # - size : 정수값 # Output: # - size가 4의 배수일 경우 True # 그렇지 않을 경우에는 False를 반환함 # Examples: # >>> import magic_square as ms # >>> ms.is_4even_number(16) # True # >>> ms.is_4even_number(32) # True # >>> ms.is_4even_number(4) # True # >>> ms.is_4even_number(8) # True # >>> ms.is_4even_number(10) # False # >>> ms.is_4even_number(12) # True # >>> ms.is_4even_number(3) # False # >>> ms.is_4even_number(7) # False # ''' result = None # ===Modify codes below============= # =================================== return result def is_odd_number(size): # ''' # Input: # - size : 정수값 # Output: # - size가 홀수 일 경우 True # 그렇지 않을 경우에는 False를 반환함 # Examples: # >>> import magic_square as ms # >>> ms.is_odd_number(3) # True # >>> ms.is_odd_number(4) # False # >>> ms.is_odd_number(5) # True # >>> ms.is_odd_number(7) # True # >>> ms.is_odd_number(8) # False # >>> ms.is_odd_number(19) # True # >>> ms.is_odd_number(10) # False # ''' result = None # ===Modify codes below============= # =================================== return result def get_4even_magic_square(user_input): # ''' # Input: # - user_input : 4의 배수인 정수형 문자열 # Output: # - user_input * user_input 크기의 마방진 list를 배열함 # ※ 출력되는 값은 반드시 아래와 같을 필요가 없음 # Examples: # >>> import magic_square as ms # >>> ms.get_4even_magic_square(4) # [[1, 15, 14, 4], [12, 6, 7, 9], [8, 10, 11, 5], [13, 3, 2, 16]] # >>> ms.get_4even_magic_square(12) # [[1, 2, 3, 141, 140, 139, 138, 137, 136, 10, 11, 12], [13, 14, 15, 129, 128, 127 # , 126, 125, 124, 22, 23, 24], [25, 26, 27, 117, 116, 115, 114, 113, 112, 34, 35, # 36], [108, 107, 106, 40, 41, 42, 43, 44, 45, 99, 98, 97], [96, 95, 94, 52, 53, # 54, 55, 56, 57, 87, 86, 85], [84, 83, 82, 64, 65, 66, 67, 68, 69, 75, 74, 73], [ # 72, 71, 70, 76, 77, 78, 79, 80, 81, 63, 62, 61], [60, 59, 58, 88, 89, 90, 91, 92 # , 93, 51, 50, 49], [48, 47, 46, 100, 101, 102, 103, 104, 105, 39, 38, 37], [109, # 110, 111, 33, 32, 31, 30, 29, 28, 118, 119, 120], [121, 122, 123, 21, 20, 19, 1 # 8, 17, 16, 130, 131, 132], [133, 134, 135, 9, 8, 7, 6, 5, 4, 142, 143, 144]] # >>> ms.get_4even_magic_square(8) # [[1, 2, 62, 61, 60, 59, 7, 8], [9, 10, 54, 53, 52, 51, 15, 16], [48, 47, 19, 20, # 21, 22, 42, 41], [40, 39, 27, 28, 29, 30, 34, 33], [32, 31, 35, 36, 37, 38, 26, # 25], [24, 23, 43, 44, 45, 46, 18, 17], [49, 50, 14, 13, 12, 11, 55, 56], [57, 5 # 8, 6, 5, 4, 3, 63, 64]] # ''' magic_sqaure_matrix = [] # ===Modify codes below============= # =================================== return magic_sqaure_matrix def get_odd_magic_square(user_input): # ''' # Input: # - user_input : 홀수인 정수형 문자열 # Output: # - user_input * user_input 크기의 마방진 list를 배열함 # ※ 출력되는 값은 반드시 아래와 같을 필요가 없음 # Examples: # >>> import magic_square as ms # >>> ms.get_odd_magic_square(3) # [[8, 1, 6], [3, 5, 7], [4, 9, 2]] # >>> ms.get_odd_magic_square(5) # [[17, 24, 1, 8, 15], [23, 5, 7, 14, 16], [4, 6, 13, 20, 22], [10, 12, 19, 21, 3] # , [11, 18, 25, 2, 9]] # >>> ms.get_odd_magic_square(7) # [[30, 39, 48, 1, 10, 19, 28], [38, 47, 7, 9, 18, 27, 29], [46, 6, 8, 17, 26, 35, # 37], [5, 14, 16, 25, 34, 36, 45], [13, 15, 24, 33, 42, 44, 4], [21, 23, 32, 41, # 43, 3, 12], [22, 31, 40, 49, 2, 11, 20]] # >>> ms.get_odd_magic_square(13) # [[93, 108, 123, 138, 153, 168, 1, 16, 31, 46, 61, 76, 91], [107, 122, 137, 152, # 167, 13, 15, 30, 45, 60, 75, 90, 92], [121, 136, 151, 166, 12, 14, 29, 44, 59, 7 # 4, 89, 104, 106], [135, 150, 165, 11, 26, 28, 43, 58, 73, 88, 103, 105, 120], [1 # 49, 164, 10, 25, 27, 42, 57, 72, 87, 102, 117, 119, 134], [163, 9, 24, 39, 41, 5 # 6, 71, 86, 101, 116, 118, 133, 148], [8, 23, 38, 40, 55, 70, 85, 100, 115, 130, # 132, 147, 162], [22, 37, 52, 54, 69, 84, 99, 114, 129, 131, 146, 161, 7], [36, 5 # 1, 53, 68, 83, 98, 113, 128, 143, 145, 160, 6, 21], [50, 65, 67, 82, 97, 112, 12 # 7, 142, 144, 159, 5, 20, 35], [64, 66, 81, 96, 111, 126, 141, 156, 158, 4, 19, 3 # 4, 49], [78, 80, 95, 110, 125, 140, 155, 157, 3, 18, 33, 48, 63], [79, 94, 109, # 124, 139, 154, 169, 2, 17, 32, 47, 62, 77]] # ''' magic_sqaure_matrix = [] # ===Modify codes below============= # =================================== return magic_sqaure_matrix def is_magic_sqaure(square): # ''' # Input: # - square : n by n 사이즈로 이루어진 two dimensional list # Output: # - 만약 square가 완벽히 마방진 형태이면 True # 그렇지 않을 경우 False # Examples: # >>> import magic_square as ms # >>> ms.is_magic_sqaure([[1,2,3],[4,5,6],[7,8,9]]) # False # >>> ms.is_magic_sqaure([[5,5,5],[4,5,6],[7,8,9]]) # False # >>> ms.is_magic_sqaure([[8, 1, 6], [3, 5, 7], [4, 9, 2]]) # True # ''' result = None # ===Modify codes below============= # ================================ return result def main(): user_input = 999 print("Play Magic Square Game!!") # ===Modify codes below============= # ================================== print("Thank you for using this program") print("End of the Game") if __name__ == "__main__": main()
TEST_OCF_ACCOUNTS = ( 'sanjay', # an old, sorried account with kerberos princ 'alec', # an old, sorried account with no kerberos princ 'guser', # an account specifically made for testing 'nonexist', # this account does not exist ) TESTER_CALNET_UIDS = ( 872544, # daradib 1034192, # ckuehl 869331, # tzhu 1031366, # mattmcal 1099131, # dkessler 1101587, # jvperrin 1511731, # ethanhs 1623751, # cooperc 1619256, # jaw ) # comma separated tuples of CalLink OIDs and student group names TEST_GROUP_ACCOUNTS = ( (91740, 'The Testing Group'), # needs to have a real OID, so boo (46187, 'Open Computing Facility'), # good old ocf (46692, 'Awesome Group of Awesome'), # boo another real OID (92029, 'eXperimental Computing Facility'), # our sister org )
# -*- coding: utf-8 -*- """ awsecommerceservice This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). """ class Item13(object): """Implementation of the 'Item13' model. TODO: type model description here. Attributes: asin (string): TODO: type description here. offer_listing_id (string): TODO: type description here. quantity (int): TODO: type description here. associate_tag (string): TODO: type description here. list_item_id (string): TODO: type description here. """ # Create a mapping from Model property names to API property names _names = { "asin":'ASIN', "offer_listing_id":'OfferListingId', "quantity":'Quantity', "associate_tag":'AssociateTag', "list_item_id":'ListItemId' } def __init__(self, asin=None, offer_listing_id=None, quantity=None, associate_tag=None, list_item_id=None): """Constructor for the Item13 class""" # Initialize members of the class self.asin = asin self.offer_listing_id = offer_listing_id self.quantity = quantity self.associate_tag = associate_tag self.list_item_id = list_item_id @classmethod def from_dictionary(cls, dictionary): """Creates an instance of this model from a dictionary Args: dictionary (dictionary): A dictionary representation of the object as obtained from the deserialization of the server's response. The keys MUST match property names in the API description. Returns: object: An instance of this structure class. """ if dictionary is None: return None # Extract variables from the dictionary asin = dictionary.get('ASIN') offer_listing_id = dictionary.get('OfferListingId') quantity = dictionary.get('Quantity') associate_tag = dictionary.get('AssociateTag') list_item_id = dictionary.get('ListItemId') # Return an object of this model return cls(asin, offer_listing_id, quantity, associate_tag, list_item_id)
class NotFoundError(Exception): def __init__(self, url): super().__init__(url) self.type = "notfound" class NoTitleError(Exception): def __init__(self, url): super().__init__(url) self.type = "notitle" class ErrorPageError(Exception): def __init__(self, url): super().__init__(url) self.type = "errorpage" class HomepageRedirectError(Exception): def __init__(self, url): super().__init__(url) self.type = "homepageredir" class FetchError(Exception): def __init__(self, url, info={}): super().__init__(url) self.type = "fetcherror" self.info = info class UnknownError(Exception): def __init__(self, url): super().__init__(url) self.type = "unknown"
init_info = input().split(" ") sapce_width = int(init_info[0]) space_length = int(init_info[1]) space_gun = int(init_info[2]) gun_x = [] gun_y = [] for each_input in range(space_gun): init_gun = input().split() gun_x.append(int(init_gun[0])) gun_y.append(int(init_gun[1])) new_width = sapce_width - len(set((gun_x))) new_length = space_length - len(set((gun_y))) print((new_width * new_length) % 25621) # Passed
class DigitalTv: def __init__(self,region): self._region = region def display(self,channel): if self._region == '新潟': if channel == 8: print('NHK総合表示中...') elif channel == 12: print('NHK教育表示中...') else: print('受信できません...') else: print('受信できません') if __name__ == '__main__': tv = DigitalTv('新潟') tv.display(8) tv.display(12) tv.display(1)
""" File: anagram.py Name: Howard ---------------------------------- This program recursively finds all the anagram(s) for the word input by user and terminates when the input string matches the EXIT constant defined at line 19 If you correctly implement this program, you should see the number of anagrams for each word listed below: * arm -> 3 anagrams * contains -> 5 anagrams * stop -> 6 anagrams * tesla -> 10 anagrams * spear -> 12 anagrams """ # Constants FILE = 'dictionary.txt' # This is the filename of an English dictionary EXIT = '-1' # Controls when to stop the loop # Global variables dic = {} # a list to store all strings in a FILE z def main(): global ans read_dictionary() print('Welcome to stanCode "Anagram Generator" (or -1 to quit)') while True: ans = [] word = input('Find anagrams for: ') if word == EXIT: break else: find_anagrams(word) print(f'{len(ans)} anagrams: {ans}') def find_anagrams(s): """ A function to find all possible anagram and add them to the global variable ans. :param s: str, a word user input to find the anagrams. :return: list, a list containing of the anagrams found in the dictionary. """ print('Searching...') return helper(s) def helper(s, current=''): """ A helper function to implement recursions. :param s: str, a word user input to find the anagrams. :param current: the current word created in the recursion. Starts with empty string. """ # Base Case: when character option left is zero if len(s) == 0: if current in dic and current not in ans: ans.append(current) print('Found: ' + current) print('Searching...') for i in range(len(s)): # Choose new_current = current + s[i] new_s = s[0:i] + s[i+1:] # a word without the character just being chosen. # to skip the words that start with prefix that are not founded in the dictionary. if has_prefix(new_current): # Explore helper(new_s, new_current) def read_dictionary(): """ This function reads the dictionary.txt file, parse the stings and append them into a global variable list. """ with open(FILE, 'r') as f: for line in f: line = line.replace('\n', '') if line not in dic: dic[line] = 1 def has_prefix(sub_s): """ This function will check every word in a file ot see whether any of them has the prefix substring. :param sub_s: str, the prefix of a word :return: bool """ for s in dic: if s.startswith(sub_s): return True return False if __name__ == '__main__': main()
# Create a calculator function # The function should accept three parameters: # first_number: a numeric value for the math operation # second_number: a numeric value for the math operation # operation: the word 'add' or 'subtract' # the function should return the result of the two numbers added or subtracted # based on the value passed in for the operator def calcutate(first, second, operation): if operation.lower() == 'add': result = first + second elif operation.lower() == 'substract': result = first - second else: result = 'Operation, not supported' return result first = float(input('Enter first number: ')) second = float(input('Enter second number: ')) operation = input('Enter operation type (add or substract): ') print(calcutate(first, second, operation)) # # Test your function with the values 6,4, add # Should return 10 # # Test your function with the values 6,4, subtract # Should return 2 # # BONUS: Test your function with the values 6, 4 and divide # Have your function return an error message when invalid values are received
''' We can pass multiple arguments to the .order_by() method to order by multiple columns. In fact, we can also sort in ascending or descending order for each individual column. Each column in the .order_by() method is fully sorted from left to right. This means that the first column is completely sorted, and then within each matching group of values in the first column, it's sorted by the next column in the .order_by() method. This process is repeated until all the columns in the .order_by() are sorted. ''' # Build a query to select state and age: stmt stmt = select([census.columns.state, census.columns.age]) # Append order by to ascend by state and descend by age stmt = stmt.order_by(census.columns.state, desc(census.columns.age)) # Execute the statement and store all the records: results results = connection.execute(stmt).fetchall() # Print the first 20 results print(results[:20])
#!/usr/bin/env python3 #################################################################################### # # # Program purpose: Finds the difference between the largest and the smallest # # integer which are created by numbers from 0 to 9. The # # number that can be rearranged shall start with 0 as in # # 00135668. # # Program Author : Happi Yvan <[email protected]> # # Creation Date : September 22, 2019 # # # #################################################################################### def read_data(mess: str): valid = False data = 0 while not valid: try: temp_data = list(input(mess).strip()) if len(temp_data) != 8: raise ValueError("Number must be 8-digit long") else: for x in range(len(temp_data)): if not f"{temp_data[x]}".isdigit(): raise ValueError(f"'{temp_data[x]}' is not an integer") data = temp_data valid = True except ValueError as ve: print(f"[ERROR]: {ve}") return data if __name__ == "__main__": main_data = read_data("Enter an integer created by 8 numbers from 0 to 9: ") largest = ''.join(sorted(main_data, reverse=True)) smallest = ''.join(sorted(main_data)) print(f"Difference between the largest {largest} and smallest {smallest}:" f" {int(''.join(largest)) - int(''.join(smallest))}")
############################################################################# # _____ __________ ___ __ # # / ___// ____/ __ \/ | / / # # \__ \/ / / /_/ / /| | / / # # ___/ / /___/ _, _/ ___ |/ /___ # # /____/\____/_/ |_/_/ |_/_____/ Smart City Resource Adaptation Layer # # # # LINKS Foundation, (c) 2017-2020 # # developed by Jacopo Foglietti & Luca Mannella # # SCRAL is distributed under a BSD-style license -- See file LICENSE.md # # # ############################################################################# """ SCRAL - constants This file contains useful constants for this module. """ # URI URL_CLOUD = "https://api.smartdatanet.it/api" URL_TENANT = "https://api.smartdatanet.it/metadataapi/api/v02/search?tenant=cittato_rumore" # Exposed URI URI_DEFAULT = "/scral/v1.0/phono-gw" URI_ACTIVE_DEVICES = URI_DEFAULT + "/active-devices" ACTIVE_DEVICES = ["ds_S_01_1928", "ds_S_02_1926", "ds_S_03_1927", "ds_S_05_1932", "ds_S_06_1931", "ds_S_07_1933"] FREQ_INTERVALS = ["16", "20", "25", "31_5", "40", "50", "63", "80", "100", "125", "160", "200", "250", "315", "400", "500", "630", "800", "1000", "1250", "1600", "2000", "2500", "3150", "4000", "5000", "6300", "8000", "10000", "12500", "16000", "20000"] FILTER_SDN_1 = "Measures?%20&$format=json&$filter=time%20gt%20datetimeoffset%27" FILTER_SDN_2 = "%27%20and%20time%20le%20datetimeoffset%27" FILTER_SDN_3 = "%27&$orderby=time%20asc&$top=50" # Timing UPDATE_INTERVAL = 15 RETRY_INTERVAL = 120 # Keys LAEQ_KEY = "LAeq" SPECTRA_KEY = "CPBLZeq" METADATA_KEY = "metadata" STREAM_KEY = "stream" SMART_OBJECT_KEY = "smartobject" CODE_KEY = "code" DATASET_KEY = "dataset" DESCRIPTION_KEY = "description" COUNT_KEY = "count" TOTAL_COUNT_KEY = "totalCount" OBS_DATA_KEY = "d" OBS_DATA_RESULTS_KEY = "results" VALUE_TYPE_KEY = "valueType" RESPONSE_KEY = "response"
class AuthenticationError(Exception): pass class MarketClosedError(Exception): pass class MarketEmptyError(Exception): pass
# coding=utf-8 # @Time : 2021/3/26 10:34 # @Auto : zzf-jeff class GlobalSetting(): label_path = './coco.names' model_path = './weights/yolov5x-simpler.engine' # model_path = './weights/yolov5s.pt' output_path = './output' img_path = './test_imgs' conf_thresh = 0.3 iou_thresh = 0.45 anchors = [ [[10, 13], [16, 30], [33, 23]], [[30, 61], [62, 45], [59, 119]], [[116, 90], [156, 198], [373, 326]], ] opt = GlobalSetting()
def test_trading_fee(position): entry_price = 100000000000000000000 # 100 current_price = 150000000000000000000 # 150 notional = 10000000000000000000 # 10 debt = 2000000000000000000 # 2 liquidated = False trading_fee_rate = 750000000000000 oi = int((notional / entry_price) * 1000000000000000000) # 0.1 fraction = 1000000000000000000 # 1 cap_payoff = 5000000000000000000 # 5 # check trading fee is notional * fee_rate is_long = True # NOTE: mid_ratio tests in test_entry_price.py mid_ratio = position.calcEntryToMidRatio(entry_price, entry_price) pos = (notional, debt, mid_ratio, is_long, liquidated, oi) expect = 11250000000000000 actual = position.tradingFee(pos, fraction, oi, oi, current_price, cap_payoff, trading_fee_rate) assert expect == actual # check trading fee is notional * fee_rate is_long = False # NOTE: mid_ratio tests in test_entry_price.py mid_ratio = position.calcEntryToMidRatio(entry_price, entry_price) pos = (notional, debt, mid_ratio, is_long, liquidated, oi) expect = 3750000000000000 actual = position.tradingFee(pos, fraction, oi, oi, current_price, cap_payoff, trading_fee_rate) assert expect == actual # check trading fee is notional * fee_rate when 0 price change is_long = True current_price = entry_price # NOTE: mid_ratio tests in test_entry_price.py mid_ratio = position.calcEntryToMidRatio(entry_price, entry_price) pos = (notional, debt, mid_ratio, is_long, liquidated, oi) expect = 7500000000000000 actual = position.tradingFee(pos, fraction, oi, oi, current_price, cap_payoff, trading_fee_rate) assert expect == actual # check trading fee is notional * fee_rate when 0 price change is_long = False current_price = entry_price # NOTE: mid_ratio tests in test_entry_price.py mid_ratio = position.calcEntryToMidRatio(entry_price, entry_price) pos = (notional, debt, mid_ratio, is_long, liquidated, oi) expect = 7500000000000000 actual = position.tradingFee(pos, fraction, oi, oi, current_price, cap_payoff, trading_fee_rate) assert expect == actual def test_trading_fee_when_entry_not_equal_to_mid(position): mid_price = 100000000000000000000 # 100 current_price = 150000000000000000000 # 150 notional = 10000000000000000000 # 10 debt = 2000000000000000000 # 2 liquidated = False trading_fee_rate = 750000000000000 oi = int((notional / mid_price) * 1000000000000000000) # 0.1 fraction = 1000000000000000000 # 1 cap_payoff = 5000000000000000000 # 5 # check trading fee is notional * fee_rate is_long = True entry_price = 101000000000000000000 # 101 # NOTE: mid_ratio tests in test_entry_price.py mid_ratio = position.calcEntryToMidRatio(entry_price, mid_price) pos = (notional, debt, mid_ratio, is_long, liquidated, oi) expect = 11175000000000000 actual = position.tradingFee(pos, fraction, oi, oi, current_price, cap_payoff, trading_fee_rate) assert expect == actual # check trading fee is notional * fee_rate is_long = False entry_price = 99000000000000000000 # 99 # NOTE: mid_ratio tests in test_entry_price.py mid_ratio = position.calcEntryToMidRatio(entry_price, mid_price) pos = (notional, debt, mid_ratio, is_long, liquidated, oi) expect = 3675000000000000 actual = position.tradingFee(pos, fraction, oi, oi, current_price, cap_payoff, trading_fee_rate) assert expect == actual # check trading fee is notional * fee_rate when 0 price change is_long = True entry_price = 101000000000000000000 # 101 current_price = entry_price # NOTE: mid_ratio tests in test_entry_price.py mid_ratio = position.calcEntryToMidRatio(entry_price, mid_price) pos = (notional, debt, mid_ratio, is_long, liquidated, oi) expect = 7500000000000000 actual = position.tradingFee(pos, fraction, oi, oi, current_price, cap_payoff, trading_fee_rate) assert expect == actual # check trading fee is notional * fee_rate when 0 price change is_long = False entry_price = 99000000000000000000 # 99 current_price = entry_price # NOTE: mid_ratio tests in test_entry_price.py mid_ratio = position.calcEntryToMidRatio(entry_price, mid_price) pos = (notional, debt, mid_ratio, is_long, liquidated, oi) expect = 7500000000000000 actual = position.tradingFee(pos, fraction, oi, oi, current_price, cap_payoff, trading_fee_rate) assert expect == actual def test_trading_fee_when_fraction_less_than_one(position): entry_price = 100000000000000000000 # 100 current_price = 150000000000000000000 # 150 notional = 10000000000000000000 # 10 debt = 2000000000000000000 # 2 liquidated = False trading_fee_rate = 750000000000000 oi = int((notional / entry_price) * 1000000000000000000) # 0.1 fraction = 250000000000000000 # 0.25 cap_payoff = 5000000000000000000 # 5 # check trading fee is notional * fee_rate is_long = True # NOTE: mid_ratio tests in test_entry_price.py mid_ratio = position.calcEntryToMidRatio(entry_price, entry_price) pos = (notional, debt, mid_ratio, is_long, liquidated, oi) expect = 2812500000000000 actual = position.tradingFee(pos, fraction, oi, oi, current_price, cap_payoff, trading_fee_rate) assert expect == actual # check trading fee is notional * fee_rate is_long = False # NOTE: mid_ratio tests in test_entry_price.py mid_ratio = position.calcEntryToMidRatio(entry_price, entry_price) pos = (notional, debt, mid_ratio, is_long, liquidated, oi) expect = 937500000000000 actual = position.tradingFee(pos, fraction, oi, oi, current_price, cap_payoff, trading_fee_rate) assert expect == actual def test_trading_fee_when_payoff_greater_than_cap(position): entry_price = 100000000000000000000 # 100 current_price = 800000000000000000000 # 800 notional = 10000000000000000000 # 10 debt = 2000000000000000000 # 2 liquidated = False trading_fee_rate = 750000000000000 oi = int((notional / entry_price) * 1000000000000000000) # 0.1 fraction = 1000000000000000000 # 1 cap_payoff = 5000000000000000000 # 5 # check trading fee is notional * fee_rate is_long = True # NOTE: mid_ratio tests in test_entry_price.py mid_ratio = position.calcEntryToMidRatio(entry_price, entry_price) pos = (notional, debt, mid_ratio, is_long, liquidated, oi) expect = 45000000000000000 actual = position.tradingFee(pos, fraction, oi, oi, current_price, cap_payoff, trading_fee_rate) assert expect == actual
# @author:leacoder # @des: 递归 二叉树的前序遍历 class Solution: def preorderTraversal(self, root: TreeNode) -> List[int]: result = [] self.helper(root,result) return result def helper(self,root,result): if not root: return result.append(root.val) self.helper(root.left,result) self.helper(root.right,result) # @author:leacoder # @des: 迭代 + 借助栈 二叉树的前序遍历 class Solution: def preorderTraversal(self, root: TreeNode) -> List[int]: result, stack = [], [root] while stack: root = stack.pop() if root is not None: result.append(root.val) if root.right is not None: # 由于 栈先进后出,所以前序遍历 先压入 right stack.append(root.right) if root.left is not None: stack.append(root.left) return result
""" 1. Two Sum Easy 10315 337 Favorite Share Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the same element twice. Example: Given nums = [2, 7, 11, 15], target = 9, Because nums[0] + nums[1] = 2 + 7 = 9, return [0, 1]. """ class Solution: def twoSum(self, nums, target): # 嵌套for循环 # for i in range(len(nums) - 1): # for j in range(i + 1, len(nums)): # if nums[i] + nums[j] == target: # return [i, j] # 内存换时间 dic = {} for i, num in enumerate(nums): if target - num in dic: return [i, dic[target -num]] dic[num] = i s = Solution() print(s.twoSum([1, 2, 3, 4], 5))
# 9th Solutions #-------------------------- n = int(input()) d = {} for i in range(n): x = input().split() d[x[0]] = x[1] while True: try: name = input() if name in d: print(name, '=', d[name], sep='') else: print('Not found') except: break
def define_targets(rules): rules.cc_test( name = "test", srcs = ["impl/CUDATest.cpp"], deps = [ "@com_google_googletest//:gtest_main", "//c10/cuda", ], target_compatible_with = rules.requires_cuda_enabled(), )
def vogal(c): if c == 'a' or c == 'e' or c == 'i' or c == 'o' or c == 'u' or c == 'A' or c == 'E' or c == 'I' or c == 'O' or c == 'U': return True else: return False
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Proof of concept. License restriction.""" load( "@rules_license//rules:providers.bzl", "LicenseInfo", "LicenseKindInfo", "LicensesInfo", ) # An experiment to provide license defaults via a rule. This is far from # working and should not be considered part of the current design. # def _default_licenses_impl(ctx): licenses = [] for dep in ctx.attr.deps: if LicenseInfo in dep: licenses.append(dep[LicenseInfo]) return [LicensesInfo(licenses = licenses)] _default_licenses = rule( implementation = _default_licenses_impl, attrs = { "deps": attr.label_list( mandatory = True, doc = "Licenses", providers = [LicenseInfo], cfg = "host", ), "conditions": attr.string_list( doc = "", ), }, ) def default_licenses(licenses, conditions = None): _default_licenses( name = "__default_licenses", deps = ["%s_license" % l for l in licenses], conditions = conditions, )
# Copyright 2021 Variscite LTD # SPDX-License-Identifier: BSD-3-Clause __version__ = "1.0.0"
#!/usr/bin/env python # Copyright (c) 2020 Intel Corporation # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. """ This module provides the base class for user-defined actor controllers. All user-defined controls must be derived from this class. A user must not modify the module. """ class BasicControl(object): """ This class is the base class for user-defined actor controllers All user-defined agents must be derived from this class. Args: actor (carla.Actor): Actor that should be controlled by the controller. Attributes: _actor (carla.Actor): Controlled actor. Defaults to None. _target_speed (float): Logitudinal target speed of the controller. Defaults to 0. _init_speed (float): Initial longitudinal speed of the controller. Defaults to 0. _waypoints (list of carla.Transform): List of target waypoints the actor should travel along. A waypoint here is of type carla.Transform! Defaults to []. _waypoints_updated (boolean): Defaults to False. _reached_goal (boolean): Defaults to False. """ _actor = None _waypoints = [] _waypoints_updated = False _target_speed = 0 _reached_goal = False _init_speed = False def __init__(self, actor): """ Initialize the actor """ self._actor = actor def update_target_speed(self, speed): """ Update the actor's target speed and set _init_speed to False. Args: speed (float): New target speed [m/s]. """ self._target_speed = speed self._init_speed = False def update_waypoints(self, waypoints, start_time=None): """ Update the actor's waypoints Args: waypoints (List of carla.Transform): List of new waypoints. """ self._waypoints = waypoints self._waypoints_updated = True def set_init_speed(self): """ Set _init_speed to True """ self._init_speed = True def check_reached_waypoint_goal(self): """ Check if the actor reached the end of the waypoint list returns: True if the end was reached, False otherwise. """ return self._reached_goal def reset(self): """ Pure virtual function to reset the controller. This should be implemented in the user-defined agent implementation. """ raise NotImplementedError( "This function must be re-implemented by the user-defined actor control." "If this error becomes visible the class hierarchy is somehow broken") def run_step(self): """ Pure virtual function to run one step of the controllers's control loop. This should be implemented in the user-defined agent implementation. """ raise NotImplementedError( "This function must be re-implemented by the user-defined actor control." "If this error becomes visible the class hierarchy is somehow broken")
# dfs def walk_parents(vertex): return sum( (walk_parents(parent) for parent in vertex.parents), [] ) + [vertex] def walk_children(vertex): return sum( (walk_children(child) for child in vertex.children), [] ) + [vertex]
""" https://leetcode.com/problems/power-of-four/ Given an integer (signed 32 bits), write a function to check whether it is a power of 4. Example 1: Input: 16 Output: true Example 2: Input: 5 Output: false Follow up: Could you solve it without loops/recursion? """ # Inspired by @h285zhao in the discussion panel. If the number is a power of 4, then it in binary format should look like: # 100 00000000000(number of 0 after 100 should be even). # time complexity: O(logn) for the base conversion, space complexity: O(n) class Solution: def isPowerOfFour(self, num: int) -> bool: s = bin(num)[3:] return num > 0 and ('1' not in s) and len(s)%2 == 0
# list1 = [i for i in range(5, 16)] # print(list1) # list1 = [i for i in range(0, 11)] # for i in range(11): # if i > 0: # print(list1[i-1] * list1[i]) # list1 = [i * j for i in range(1, 10) for j in range(1, 10)] # print(list1) str1 = str(input()) strArray = list(str1) newList = [] for i in strArray: if i > "e": del i else: newList.append(i) print(*newList)
# Flask settings DEBUG = False # Flask-restplus settings RESTPLUS_MASK_SWAGGER = False SWAGGER_UI_DOC_EXPANSION = 'none' # Application settings # API metadata API_TITLE = 'MAX Image Colorizer' API_DESC = 'Adds color to black and white images.' API_VERSION = '1.1.0' ERR_MSG = 'Invalid file type/extension. Please provide a valid image (supported formats: JPEG, PNG).' # default model MODEL_NAME = API_TITLE MODEL_ID = MODEL_NAME.replace(' ', '-').lower() DEFAULT_MODEL_PATH = 'assets/pix2pix-bw-to-color' MODEL_LICENSE = 'MIT'
minx = 20 maxx = 30 miny = -10 maxy = -5 minx = 25 maxx = 67 miny = -260 maxy = -200 def simulate(vx, vy): x = 0 y = 0 highest = 0 while y > miny: x += vx y += vy if vx > 0: vx -= 1 elif vx < 0: vx += 1 vy -= 1 if vy == 0: highest = y if x >= minx and x <= maxx and y >= miny and y <= maxy: return highest return -1 result = 0 num = 0 for x in range(1, maxx + 1): for y in range(miny, 500): v = simulate(x, y) if v >= 0: num += 1 if v > result: result = v print(f"{result}") print(f"{num}")
def file_to_list(filename): lines = [] fin = open(filename, "rt", encoding="utf-8") lines = fin.readlines() fin.close() return lines def print_table(lines): template = { "1": "+" + "-" * 11 + "+" + "-" * 11 + "+" + "-" * 8 + "+", "2": "| {:<10.9}| {:<10.9}| {:<7.6}|", } print(template["1"]) print(template["2"].format("Last", "First", "Salary")) print(template["1"]) for line in lines: field = line.rstrip().split(",") print(template["2"].format(field[0], field[1], field[2])) print(template["1"]) def main(): lines = file_to_list("../data/42.txt") print_table(lines) main()
# -*- coding: utf-8 -*- # Copyright 2021 Cohesity Inc. class SiteIdentity(object): """Implementation of the 'SiteIdentity' model. O365 Sharepoint online Site Identity. These may be obtained by Graph/REST or PnP cmdlets. All fields are case insensitive. Attributes: id (string): Unique guid for the site in SPO. This is a unqiue identifier that can be used to compare sites. server_relativeurl (string): Optional ServerRelativeUrl. Not required. title (string): Optional Title of site for display and logging purpose. Not mandatory. url (string): Full Url of the site. Its of the form https://yourtenant.sharepoint.com/sites/yoursite or https://yourtenant.sharepoint.com/yoursite This parameter is required for all PnP operations. webid (string): Unique guid for the site root web. """ # Create a mapping from Model property names to API property names _names = { "id":'id', "server_relativeurl":'serverRelativeurl', "title":'title', "url":'url', "webid":'webid' } def __init__(self, id=None, server_relativeurl=None, title=None, url=None, webid=None): """Constructor for the SiteIdentity class""" # Initialize members of the class self.id = id self.server_relativeurl = server_relativeurl self.title = title self.url = url self.webid = webid @classmethod def from_dictionary(cls, dictionary): """Creates an instance of this model from a dictionary Args: dictionary (dictionary): A dictionary representation of the object as obtained from the deserialization of the server's response. The keys MUST match property names in the API description. Returns: object: An instance of this structure class. """ if dictionary is None: return None # Extract variables from the dictionary id = dictionary.get('id') server_relativeurl = dictionary.get('serverRelativeurl') title = dictionary.get('title') webid = dictionary.get('webid') url = dictionary.get('url') # Return an object of this model return cls(id, server_relativeurl, title, url, webid)
a = int(input()) b = int(input()) c = int(input()) a_odd = a % 2 b_odd = b % 2 c_odd = c % 2 a_even = not (a % 2) b_even = not (b % 2) c_even = not (c % 2) if (a_odd or b_odd or c_odd) and (a_even or b_even or c_even): print("YES") else: print("NO")
# -*- coding: utf-8 -*- """ @file @brief quelques fonctions à propos de la première séance """ def commentaire_accentues(): """ L'aide de cette fonction contient assuréments des accents. @FAQ(Python n'accepte pas les accents) Le langage Python a été conçu en langage anglais. Dès qu'on on ajoute un caractère qui ne fait pas partie de l'alphabet anglais (ponctuation comprise), il déclenche une erreur : @code File "faq_cvxopt.py", line 3 SyntaxError: Non-UTF-8 code starting with '\xe8' in file faq_cvxopt.py on line 4, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details @endcode Pour la résoudre, il faut dire à l'interpréteur que des caractères non anglais peuvent apparaître et écrire sur la première ligne du programme : @code # -*- coding: latin-1 -*- @endcode Ou pour tout caractère y compris chinois : @code # -*- coding: utf-8 -*- @endcode Si vous utilisez l'éditeur `SciTE <http://www.scintilla.org/SciTE.html>`_ sous Windows, après avoir ajouté cette ligne avec l'encoding `utf-8`, il est conseillé de fermer le fichier puis de le réouvrir. SciTE le traitera différemment. @endFAQ """ pass
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Definition of wrap_web_test_suite.""" load("//web:web.bzl", "web_test_suite") load(":constants.bzl", "DEFAULT_TEST_SUITE_TAGS", "DEFAULT_WEB_TEST_SUITE_TAGS", "DEFAULT_WRAPPED_TEST_TAGS") def wrap_web_test_suite( name, browsers, rule, args = None, browser_overrides = None, config = None, flaky = None, local = None, shard_count = None, size = None, tags = DEFAULT_WEB_TEST_SUITE_TAGS, test_suite_tags = DEFAULT_TEST_SUITE_TAGS, timeout = None, visibility = None, web_test_data = None, wrapped_test_tags = DEFAULT_WRAPPED_TEST_TAGS, **remaining_keyword_args): """Defines a test_suite of web_test targets that wrap a given rule. Args: name: The base name of the test. browsers: A sequence of lavels specifying the browsers to use. rule: The rule for the wrapped target. args: Args for web_test targets generated by this extension. browser_overrides: Dictionary; optional; default is an empty dictionary. A dictionary mapping from browser names to browser-specific web_test attributes, such as shard_count, flakiness, timeout, etc. For example: {'//browsers:chrome-native': {'shard_count': 3, 'flaky': 1} '//browsers:firefox-native': {'shard_count': 1, 'timeout': 100}}. config: Label; optional; Configuration of web test features. flaky: A boolean specifying that the test is flaky. If set, the test will be retried up to 3 times (default: 0) local: boolean; optional. shard_count: The number of test shards to use per browser. (default: 1) size: A string specifying the test size. (default: 'large') tags: A list of test tag strings to apply to each generated web_test target. test_suite_tags: A list of tag strings for the generated test_suite. timeout: A string specifying the test timeout (default: computed from size) visibility: List of labels; optional. web_test_data: Data dependencies for the web_test. wrapped_test_tags: A list of test tag strings to use for the wrapped test **remaining_keyword_args: Arguments for the wrapped test target. """ size = size or "large" wrapped_test_name = name + "_wrapped_test" rule( name = wrapped_test_name, args = args, flaky = flaky, local = local, shard_count = shard_count, size = size, tags = wrapped_test_tags, timeout = timeout, visibility = ["//visibility:private"], **remaining_keyword_args ) web_test_suite( name = name, args = args, browsers = browsers, browser_overrides = browser_overrides, config = config, data = web_test_data, flaky = flaky, local = local, shard_count = shard_count, size = size, tags = tags, test = wrapped_test_name, test_suite_tags = test_suite_tags, timeout = timeout, visibility = visibility, )
class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: def closestValue(self, root: TreeNode, target: float) -> int: if root == None: return float('inf') diff = target - root.val if diff > 0: sub_closest = self.closestValue(root.right, target) elif diff < 0: sub_closest = self.closestValue(root.left, target) else: return root.val if abs(root.val - target) > abs(sub_closest - target): return sub_closest else: return root.val
command = '/opt/django/smegurus-django/env/bin/gunicorn' pythonpath = '/opt/django/smegurus-django/smegurus' bind = '127.0.0.1:8001' workers = 3
# -*- coding: utf-8 -*- # # Copyright (c) 2017 - 2019, doudoudzj # All rights reserved. # # InPanel is distributed under the terms of the New BSD License. # The full license can be found in 'LICENSE'. """Module for Lighttpd configuration management.""" def web_response(self): action = self.get_argument('action', '') if action == 'getsettings': self.write({'code': 0, 'msg': 'Lighttpd 配置信息获取成功!', 'data': get_config()}) elif action == 'savesettings': self.write({'code': 0, 'msg': 'Lighttpd 服务配置保存成功!', 'data': set_config(self)}) return def get_config(): return dict() def set_config(self): return dict()
language_compiler_param = \ { "java": "-encoding UTF-8 -d -cp ." }
aTuple = ("Orange", [10, 20, 30], (5, 15, 25)) print(aTuple[1][1])
__all__ = [ "sorter", "ioputter", "handler", "timer", "simple", "process", "HarnessChartProcessing", "KomaxTaskProcessing", "KomaxCore", "HarnessProcessing" ]
_base_ = "base.py" fold = 1 percent = 1 data = dict( samples_per_gpu=1, workers_per_gpu=1, train=dict( ann_file="data/coco/annotations/semi_supervised/instances_train2017.${fold}@${percent}.json", img_prefix="data/coco/train2017/", ), ) work_dir = "work_dirs/${cfg_name}/${percent}/${fold}" log_config = dict( interval=50, hooks=[ dict(type="TextLoggerHook"), dict( type="WandbLoggerHook", init_kwargs=dict( project="pre_release", name="${cfg_name}", config=dict( fold="${fold}", percent="${percent}", work_dirs="${work_dir}", total_step="${runner.max_iters}", ), ), by_epoch=False, ), ], )
class GumballMonitor: def __init__(self, machine): self.machine = machine def report(self): try: print(f'Gumball Machine: {self.machine.get_location()}') print(f'Current inventory: {self.machine.get_count()} gumballs') except Exception as e: print(e)
class Opt(): def __init__(self): # mode options self.isDebug = False self.decoder_mode = 0 # {0:'pointer-generator', 1:'only-generator', 2:'only-copy'} # GPU self.usegpu = True self.gpuid = 1 # preprocess.py self.seed = 3435 self.totalVocabSize = 50000 # 使用的时候最好用dicts.size() self.genVocabSize = 5000 self.lower = True self.shuffle = True self.word_embedding_path = "./data/glove.840B.300d.txt" self.PAD, self.UNK, self.BOS, self.EOS = 0, 1, 2, 3 self.PAD_WORD, self.UNK_WORD, self.BOS_WORD, self.EOS_WORD = '<pad>', '<unk>', '<s>', '</s>' # Model options self.layers = 2 self.rnn_size = 500 # 包含双向的 self.word_vec_size = 300 self.brnn = True # Optimization options self.batch_size = 6 self.epochs = 50 self.start_epoch = 1 self.param_init = 0.1 self.dropout = 0.3 self.max_generator_batches = 32 self.max_decoder_length = 60 self.beam_size = 4 self.n_best = 1 # learning rate self.optim = 'sgd' self.learning_rate = 0.1 self.max_grad_norm = 5 self.learning_rate_decay = 0.5 self.start_decay_at = None # 8
# -*- coding:utf-8 -*- # --------------------------------------------- # @file DoubleLinkedList.py.py # @description Double Linked List # @author WcJun # @date 2020/06/21 # --------------------------------------------- # 节点 class Node(object): def __init__(self, element): self.element = element self.next = None self.prev = None # 双向链表 class DoubleLinkedList: def __init__(self, node=None): if node is not None: head = Node(node) self.__head = head else: self.__head = node # 在 头部添加元素 def add(self, item): node = Node(item) # 1.将 新节点 的 链接域 next 指向头节点 node.next = self.__head # 2.将 __head 头节点的 prev 指向 新的节点 if self.is_empty(): self.__head = node else: self.__head.prev = node # 3.将 链表的头节点__head 指向 新节点 self.__head = node return # 在 单向链表的尾部 追加元素 def append(self, item): node = Node(item) # 链表为空的场景 if self.is_empty(): self.__head = node else: current_node = self.__head while current_node.next is not None: current_node = current_node.next current_node.next = node # 将 node 节点的前驱节点 指向 当前节点 node.prev = current_node return # 在 指定位置添加元素 def insert(self, position, item): if position <= 0: # 头部插入 self.add(item) elif position > (self.length() - 1): # 大于列表的长度 - 尾部插入 self.append(item) else: count = 0 current_node = self.__head node = Node(item) while count <= (position - 1): count += 1 current_node = current_node.next # 将 新 node 节点 的前驱 指向当前节点 node.prev = current_node # 将 新 node 节点的后继 指向 当前节点的下一个节点 node.next = current_node.next # 将 当前节点的下一个节点的前驱 指向 新 node 节点 current_node.next.prev = node # 将 当前节点的后继 指向 新 node 节点 current_node.next = node return # 删除 节点 def remove(self, item): current_node = self.__head while current_node is not None: if current_node.element == item: # 判断 current_node 是不是 头节点 if current_node == self.__head: self.__head = current_node.next # 判断当前节点是否只有一个节点,如果只有一个节点,则不需要移动下一个节点前驱 if current_node.next is not None: current_node.next.prev = None else: current_node.prev.next = current_node.next # 判断当前节点 是不是 最后一个节点,如果是最后一个节点,最后一个节点的下一个节点指向 None if current_node.next is not None: current_node.next.prev = current_node.prev break else: current_node = current_node.next return # 搜索 节点 def search(self, item): current_node = self.__head while current_node is not None: if current_node.element == item: return True current_node = current_node.next return False # 判断 链表是否为空 def is_empty(self): # 判断 __head 是否指向的 None return self.__head is None # 计算 链表的长度 def length(self): node_count = 0 current_node = self.__head while current_node is not None: node_count += 1 current_node = current_node.next return node_count # 遍历 def travel(self): current_node = self.__head while current_node is not None: print(current_node.element, end="\t") current_node = current_node.next print() if __name__ == "__main__": double_linked_list1 = DoubleLinkedList() double_linked_list1.add(10) double_linked_list1.add(11) double_linked_list1.travel() double_linked_list1.append(111) double_linked_list1.append(222) double_linked_list1.append(333) # 11 10 111 222 333 double_linked_list1.travel() print("length:", double_linked_list1.length()) double_linked_list1.insert(2, 444) double_linked_list1.travel() double_linked_list1.insert(-2, 555) double_linked_list1.travel() double_linked_list1.insert(100, 1000) # 555 11 10 111 444 222 333 1000 double_linked_list1.travel() double_linked_list1.remove(222) double_linked_list1.remove(555) double_linked_list1.remove(1000) # 11 10 111 444 333 double_linked_list1.travel() find_succeed_true = double_linked_list1.search(111) find_succeed_false = double_linked_list1.search(1111) print("find_succeed_true:", find_succeed_true) print("find_succeed_false:", find_succeed_false)
################### Error URLs ##################### # For imageGen.py not_enough_info = 'http://i.imgur.com/2BZk32a.jpg' improperly_formatted_tag = 'http://i.imgur.com/HvFX82m.jpg' # For memeAPI.py meme_not_supported = 'http://i.imgur.com/6VoMZqm.jpg' couldnt_create_meme = 'http://i.imgur.com/bkW1HEV.jpg' too_many_lines = 'http://i.imgur.com/fGkrbGe.jpg' too_few_lines = 'http://i.imgur.com/aLYiN7V.jpg' # For gifAPI.py no_search_params = 'http://i.imgur.com/60KAAPv.jpg' no_suitable_gif = 'http://i.imgur.com/gH3bPTs.jpg'
# # PySNMP MIB module CENTILLION-FILTERS-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CENTILLION-FILTERS-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:47:45 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint", "SingleValueConstraint") StatusIndicator, sysConfig = mibBuilder.importSymbols("CENTILLION-ROOT-MIB", "StatusIndicator", "sysConfig") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") TimeTicks, Counter32, MibIdentifier, Gauge32, ObjectIdentity, Unsigned32, NotificationType, iso, Counter64, MibScalar, MibTable, MibTableRow, MibTableColumn, ModuleIdentity, IpAddress, Integer32, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "TimeTicks", "Counter32", "MibIdentifier", "Gauge32", "ObjectIdentity", "Unsigned32", "NotificationType", "iso", "Counter64", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ModuleIdentity", "IpAddress", "Integer32", "Bits") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") class GeneralFilterName(DisplayString): subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(8, 8) fixedLength = 8 class NetbiosFilterName(DisplayString): subtypeSpec = DisplayString.subtypeSpec + ValueSizeConstraint(16, 16) fixedLength = 16 class NetbiosFilterAction(Integer32): subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("discard", 1), ("forward", 2)) filterGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11)) filterGroupTable = MibTable((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 1), ) if mibBuilder.loadTexts: filterGroupTable.setStatus('mandatory') if mibBuilder.loadTexts: filterGroupTable.setDescription('Filter Group Table. Entries are added into the group by specifying values for all objects with the exception of the filterGroupMonitorDests and filterGroupAdditionalDests objects. Entries are deleted simply by specifying the appropriate filterGroupStatus value.') filterGroupEntry = MibTableRow((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 1, 1), ).setIndexNames((0, "CENTILLION-FILTERS-MIB", "filterGroupName"), (0, "CENTILLION-FILTERS-MIB", "filterGroupIndex")) if mibBuilder.loadTexts: filterGroupEntry.setStatus('mandatory') if mibBuilder.loadTexts: filterGroupEntry.setDescription('An entry in the filter group table. Table entries are indexed by the unique user-defined group name, and the filter entry index as assigned by the system.') filterGroupName = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 1, 1, 1), GeneralFilterName()).setMaxAccess("readwrite") if mibBuilder.loadTexts: filterGroupName.setStatus('mandatory') if mibBuilder.loadTexts: filterGroupName.setDescription('A user-defined unique ASCII string identifying the filter group.') filterGroupIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 1, 1, 2), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: filterGroupIndex.setStatus('mandatory') if mibBuilder.loadTexts: filterGroupIndex.setDescription('The index of the filter entry within the filter group. Any filter group entry is uniquely identifable by the group nam and index.') filterGroupStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 1, 1, 3), StatusIndicator()).setMaxAccess("readwrite") if mibBuilder.loadTexts: filterGroupStatus.setStatus('mandatory') if mibBuilder.loadTexts: filterGroupStatus.setDescription('The status of this filter group entry. Entries may be deleted by setting this object to invalid(2).') filterGroupMatch = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("lt", 1), ("eq", 2), ("le", 3), ("gt", 4), ("ne", 5), ("ge", 6)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: filterGroupMatch.setStatus('mandatory') if mibBuilder.loadTexts: filterGroupMatch.setDescription('The match condition for the filter. Match conditions are in the form of the usual logical operators.') filterGroupType = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("macFilter", 1), ("llcFilter", 2), ("vlanFilter", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: filterGroupType.setStatus('mandatory') if mibBuilder.loadTexts: filterGroupType.setDescription("The type of filter. MAC filters are defined from the start of the MAC frame. LLC filters are defined from the start of the LLC header (after RIF). VLAN filters operate on a packet's VLAN classification parameters. For a valid VLAN filter, filterGroupOffset be set to 0, and filterGroupValue must contain exactly four bytes of VLAN filter data as shown below: Octet 1 Defines the user priority match criteria for VLAN filter. Valid values are 0x01 through 0xFF. Each bit in the octet corresponds to one of the eight available user priority level as defined by the 802.1Q draft specification. The least significant bit represents priority zero, and the most significant bit represents priority seven. Octet 2 Defines the Canonical Format Indicator (CFI) match criteria for VLAN filter. Possible values are 0x00, 0x01 and 0xFF. The value 0xFF indicates the switch should ignore CFI value when filtering. Octet 3 and 4 Define 12-bit VLAN ID match criteria for VLAN filter. Valid values are 0x001 through 0xFFF.") filterGroupOffset = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 1, 1, 6), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: filterGroupOffset.setStatus('mandatory') if mibBuilder.loadTexts: filterGroupOffset.setDescription('The byte offset from the beginning of the header to the value to filter.') filterGroupValue = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 1, 1, 7), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 12))).setMaxAccess("readwrite") if mibBuilder.loadTexts: filterGroupValue.setStatus('mandatory') if mibBuilder.loadTexts: filterGroupValue.setDescription('The filter value field. The value is specified as a hexadecimal string up to 12 bytes.') filterGroupForward = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("normClear", 1), ("alt", 2), ("add", 3), ("addAlt", 4), ("norm", 5), ("normAlt", 6), ("normAdd", 7), ("normAddAlt", 8), ("drop", 9)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: filterGroupForward.setStatus('mandatory') if mibBuilder.loadTexts: filterGroupForward.setDescription('The forwarding rule for the filter. Forward to normal indicates that the frame should be forwarded as usual.') filterGroupNextIfMatch = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 1, 1, 9), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: filterGroupNextIfMatch.setStatus('mandatory') if mibBuilder.loadTexts: filterGroupNextIfMatch.setDescription('The next filter entry as referenced by the filter index to apply if the filter match succeeds. An entry of 0 indicates that filtering ends for the packet. An entry whose value is larger than the number of filters in the group indicates that the next filter entry to apply is the next filter group (if any) enabled on the port.') filterGroupNextIfFail = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 1, 1, 10), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: filterGroupNextIfFail.setStatus('mandatory') if mibBuilder.loadTexts: filterGroupNextIfFail.setDescription('The next filter entry as referenced by the filter index to apply if the filter match fails. An entry of 0 indicates that filtering ends for the packet. An entry whose value is larger than the number of filters in the group indicates that the next filter entry to apply is the next filter group (if any) enabled on the port.') filterGroupAdditionalDests = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 1, 1, 11), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 256))).setMaxAccess("readwrite") if mibBuilder.loadTexts: filterGroupAdditionalDests.setStatus('deprecated') if mibBuilder.loadTexts: filterGroupAdditionalDests.setDescription('This will be replaced by filterGroupAdditionalDestions. A list of up to 256 pairs of additional cards and ports to send packets matching this filter. Each unsigned int8 is formatted as follows: the high-order 4 bits represent the card number, the low order 4 bits are the port number.') filterGroupMonitorDests = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 1, 1, 12), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 1))).setMaxAccess("readwrite") if mibBuilder.loadTexts: filterGroupMonitorDests.setStatus('deprecated') if mibBuilder.loadTexts: filterGroupMonitorDests.setDescription('This will be replaced by filterGroupAlternateDestination. A pair of the monitoring card and port to send packets matching this filter. Each unsigned int8 is formatted as follows: the high-order 4 bits represent the card number, the low order 4 bits are the port number.') filterGroupAdditionalDestinations = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 1, 1, 13), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 512))).setMaxAccess("readwrite") if mibBuilder.loadTexts: filterGroupAdditionalDestinations.setStatus('mandatory') if mibBuilder.loadTexts: filterGroupAdditionalDestinations.setDescription('For 24 ports support. This is to replace filterGroupAdditionalDests. Setting either filterGroupAdditionalDests or filterGroupAlternateDestination is enough. And if both are set, the one set later will be in effect. Make sure that even number of octets are given. A list of up to 256 pairs of additional cards and ports to send packets matching this filter. Each pair of octets is formatted as follows: the high-order octet represent the card number, the low order octet is the port number.') filterGroupAlternateDestination = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 1, 1, 14), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 2))).setMaxAccess("readwrite") if mibBuilder.loadTexts: filterGroupAlternateDestination.setStatus('mandatory') if mibBuilder.loadTexts: filterGroupAlternateDestination.setDescription('For 24 ports support. This is to replace filterGroupMonitorDests. Setting either filterGroupMonitorDests filterGroupAlternateDestination is enough. And if both are set, the one set later will be in effect. Make sure that even number of octets are given. A pair of the monitoring card and port to send packets matching this filter. Each pair of octets is formatted as follows: the high-order byte represent the card number, the low order byte is the port number.') filterPortTable = MibTable((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 2), ) if mibBuilder.loadTexts: filterPortTable.setStatus('mandatory') if mibBuilder.loadTexts: filterPortTable.setDescription('Input Filter Port Table.') filterPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 2, 1), ).setIndexNames((0, "CENTILLION-FILTERS-MIB", "filterPortCardNumber"), (0, "CENTILLION-FILTERS-MIB", "filterPortPortNumber"), (0, "CENTILLION-FILTERS-MIB", "filterPortIndex")) if mibBuilder.loadTexts: filterPortEntry.setStatus('mandatory') if mibBuilder.loadTexts: filterPortEntry.setDescription('An entry in the filter group table. Table entries are indexed by the unique user-defined group name, and the filter entry index as assigned by the system.') filterPortCardNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 2, 1, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: filterPortCardNumber.setStatus('mandatory') if mibBuilder.loadTexts: filterPortCardNumber.setDescription('The card number to which the filters apply.') filterPortPortNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 2, 1, 2), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: filterPortPortNumber.setStatus('mandatory') if mibBuilder.loadTexts: filterPortPortNumber.setDescription('The port number to which the filters apply.') filterPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 2, 1, 3), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: filterPortIndex.setStatus('mandatory') if mibBuilder.loadTexts: filterPortIndex.setDescription('A unique value for each filter group within the port.') filterPortStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 2, 1, 4), StatusIndicator()).setMaxAccess("readwrite") if mibBuilder.loadTexts: filterPortStatus.setStatus('mandatory') if mibBuilder.loadTexts: filterPortStatus.setDescription('The status of this filter port entry. Entries may be deleted by setting this object to invalid(2).') filterPortGroupName = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 2, 1, 5), GeneralFilterName()).setMaxAccess("readwrite") if mibBuilder.loadTexts: filterPortGroupName.setStatus('mandatory') if mibBuilder.loadTexts: filterPortGroupName.setDescription('The filter port group name.') netbiosFilterPortTable = MibTable((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 3), ) if mibBuilder.loadTexts: netbiosFilterPortTable.setStatus('mandatory') if mibBuilder.loadTexts: netbiosFilterPortTable.setDescription('The NetBIOS name filter table indexed by card and port numbers. ') netbiosFilterPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 3, 1), ).setIndexNames((0, "CENTILLION-FILTERS-MIB", "netbiosFilterPortCardNumber"), (0, "CENTILLION-FILTERS-MIB", "netbiosFilterPortPortNumber"), (0, "CENTILLION-FILTERS-MIB", "netbiosFilterPortIndex")) if mibBuilder.loadTexts: netbiosFilterPortEntry.setStatus('mandatory') if mibBuilder.loadTexts: netbiosFilterPortEntry.setDescription('An entry in the NetBios filter port table. Table entries are indexed by the card, port and PortIndex as assigned by the system.') netbiosFilterPortCardNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 3, 1, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: netbiosFilterPortCardNumber.setStatus('mandatory') if mibBuilder.loadTexts: netbiosFilterPortCardNumber.setDescription('The card number to which the filters apply.') netbiosFilterPortPortNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 3, 1, 2), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: netbiosFilterPortPortNumber.setStatus('mandatory') if mibBuilder.loadTexts: netbiosFilterPortPortNumber.setDescription('The port number to which the filters apply.') netbiosFilterPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 3, 1, 3), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: netbiosFilterPortIndex.setStatus('mandatory') if mibBuilder.loadTexts: netbiosFilterPortIndex.setDescription('A unique value for each filter group within the port.') netbiosFilterPortStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 3, 1, 4), StatusIndicator()).setMaxAccess("readwrite") if mibBuilder.loadTexts: netbiosFilterPortStatus.setStatus('mandatory') if mibBuilder.loadTexts: netbiosFilterPortStatus.setDescription('The status of this NetBIOS filter entry. Entries may be deleted by setting this object to invalid(2).') netbiosFilterPortName = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 3, 1, 5), NetbiosFilterName()).setMaxAccess("readwrite") if mibBuilder.loadTexts: netbiosFilterPortName.setStatus('mandatory') if mibBuilder.loadTexts: netbiosFilterPortName.setDescription('The NetBIOS name to match for filtering. The name will be blank padded.') netbiosFilterPortAction = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 3, 1, 6), NetbiosFilterAction()).setMaxAccess("readwrite") if mibBuilder.loadTexts: netbiosFilterPortAction.setStatus('mandatory') if mibBuilder.loadTexts: netbiosFilterPortAction.setDescription('The action to take upon matching the name filter.') netbiosFilterRingTable = MibTable((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 4), ) if mibBuilder.loadTexts: netbiosFilterRingTable.setStatus('mandatory') if mibBuilder.loadTexts: netbiosFilterRingTable.setDescription('The NetBIOS name filter table indexed by ring number.') netbiosFilterRingEntry = MibTableRow((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 4, 1), ).setIndexNames((0, "CENTILLION-FILTERS-MIB", "netbiosFilterRingNumber"), (0, "CENTILLION-FILTERS-MIB", "netbiosFilterRingIndex")) if mibBuilder.loadTexts: netbiosFilterRingEntry.setStatus('mandatory') if mibBuilder.loadTexts: netbiosFilterRingEntry.setDescription('An entry in the NetBios filter port table. Table entries are indexed by ring number and PortIndex as assigned by the system.') netbiosFilterRingNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 4, 1, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: netbiosFilterRingNumber.setStatus('mandatory') if mibBuilder.loadTexts: netbiosFilterRingNumber.setDescription('The ring number to which the filters apply.') netbiosFilterRingIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 4, 1, 2), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: netbiosFilterRingIndex.setStatus('mandatory') if mibBuilder.loadTexts: netbiosFilterRingIndex.setDescription('A unique value for each filter group within the port.') netbiosFilterRingStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 4, 1, 3), StatusIndicator()).setMaxAccess("readwrite") if mibBuilder.loadTexts: netbiosFilterRingStatus.setStatus('mandatory') if mibBuilder.loadTexts: netbiosFilterRingStatus.setDescription('The status of this NetBIOS filter entry. Entries may be deleted by setting this object to invalid(2).') netbiosFilterRingName = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 4, 1, 4), NetbiosFilterName()).setMaxAccess("readwrite") if mibBuilder.loadTexts: netbiosFilterRingName.setStatus('mandatory') if mibBuilder.loadTexts: netbiosFilterRingName.setDescription('The NetBIOS name to match for filtering. The name will be blank padded.') netbiosFilterRingAction = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 4, 1, 5), NetbiosFilterAction()).setMaxAccess("readwrite") if mibBuilder.loadTexts: netbiosFilterRingAction.setStatus('mandatory') if mibBuilder.loadTexts: netbiosFilterRingAction.setDescription('The action to take upon matching the name filter.') outputFilterPortTable = MibTable((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 5), ) if mibBuilder.loadTexts: outputFilterPortTable.setStatus('mandatory') if mibBuilder.loadTexts: outputFilterPortTable.setDescription('Output Filter Port Table.') outputFilterPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 5, 1), ).setIndexNames((0, "CENTILLION-FILTERS-MIB", "outputFilterPortCardNumber"), (0, "CENTILLION-FILTERS-MIB", "outputFilterPortPortNumber"), (0, "CENTILLION-FILTERS-MIB", "outputFilterPortIndex")) if mibBuilder.loadTexts: outputFilterPortEntry.setStatus('mandatory') if mibBuilder.loadTexts: outputFilterPortEntry.setDescription('An entry in the filter group table. Table entries are indexed by the unique user-defined group name, and the filter entry index as assigned by the system.') outputFilterPortCardNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 5, 1, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: outputFilterPortCardNumber.setStatus('mandatory') if mibBuilder.loadTexts: outputFilterPortCardNumber.setDescription('The card number to which the filters apply.') outputFilterPortPortNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 5, 1, 2), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: outputFilterPortPortNumber.setStatus('mandatory') if mibBuilder.loadTexts: outputFilterPortPortNumber.setDescription('The port number to which the filters apply.') outputFilterPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 5, 1, 3), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: outputFilterPortIndex.setStatus('mandatory') if mibBuilder.loadTexts: outputFilterPortIndex.setDescription('A unique value for each filter group within the port.') outputFilterPortStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 5, 1, 4), StatusIndicator()).setMaxAccess("readwrite") if mibBuilder.loadTexts: outputFilterPortStatus.setStatus('mandatory') if mibBuilder.loadTexts: outputFilterPortStatus.setDescription('The status of this filter port entry. Entries may be deleted by setting this object to invalid(2).') outputFilterPortGroupName = MibTableColumn((1, 3, 6, 1, 4, 1, 930, 2, 1, 2, 11, 5, 1, 5), GeneralFilterName()).setMaxAccess("readwrite") if mibBuilder.loadTexts: outputFilterPortGroupName.setStatus('mandatory') if mibBuilder.loadTexts: outputFilterPortGroupName.setDescription('The filter port group name.') mibBuilder.exportSymbols("CENTILLION-FILTERS-MIB", netbiosFilterPortName=netbiosFilterPortName, filterGroupValue=filterGroupValue, netbiosFilterRingName=netbiosFilterRingName, filterGroupOffset=filterGroupOffset, netbiosFilterPortCardNumber=netbiosFilterPortCardNumber, NetbiosFilterName=NetbiosFilterName, netbiosFilterRingTable=netbiosFilterRingTable, netbiosFilterPortPortNumber=netbiosFilterPortPortNumber, outputFilterPortIndex=outputFilterPortIndex, filterGroupForward=filterGroupForward, outputFilterPortPortNumber=outputFilterPortPortNumber, filterGroupName=filterGroupName, filterGroupNextIfMatch=filterGroupNextIfMatch, filterGroupAdditionalDests=filterGroupAdditionalDests, netbiosFilterPortAction=netbiosFilterPortAction, outputFilterPortTable=outputFilterPortTable, netbiosFilterRingIndex=netbiosFilterRingIndex, outputFilterPortEntry=outputFilterPortEntry, netbiosFilterPortIndex=netbiosFilterPortIndex, outputFilterPortCardNumber=outputFilterPortCardNumber, netbiosFilterRingNumber=netbiosFilterRingNumber, filterPortStatus=filterPortStatus, netbiosFilterRingAction=netbiosFilterRingAction, filterGroup=filterGroup, netbiosFilterPortStatus=netbiosFilterPortStatus, filterGroupIndex=filterGroupIndex, netbiosFilterPortTable=netbiosFilterPortTable, filterPortEntry=filterPortEntry, filterGroupTable=filterGroupTable, filterPortTable=filterPortTable, filterGroupMatch=filterGroupMatch, GeneralFilterName=GeneralFilterName, netbiosFilterPortEntry=netbiosFilterPortEntry, netbiosFilterRingStatus=netbiosFilterRingStatus, outputFilterPortGroupName=outputFilterPortGroupName, filterGroupType=filterGroupType, filterGroupMonitorDests=filterGroupMonitorDests, filterPortCardNumber=filterPortCardNumber, filterGroupStatus=filterGroupStatus, filterGroupAlternateDestination=filterGroupAlternateDestination, filterPortGroupName=filterPortGroupName, filterPortPortNumber=filterPortPortNumber, filterGroupEntry=filterGroupEntry, outputFilterPortStatus=outputFilterPortStatus, filterGroupAdditionalDestinations=filterGroupAdditionalDestinations, netbiosFilterRingEntry=netbiosFilterRingEntry, filterPortIndex=filterPortIndex, filterGroupNextIfFail=filterGroupNextIfFail, NetbiosFilterAction=NetbiosFilterAction)
""" Author: Haris Hasic, PhD Student Institution: Ishida Laboratory, Department of Computer Science, School of Computing, Tokyo Institute of Technology Updated on: April, 2021 Description: Currently, this folder does not contain any libraries which are taken from an outside source. Disclaimer: The authors do not own any of the contents in this folder, nor vouch for the correctness of the code. It is simply used as a sort of plug-and-play, open-source material in accordance with the provided licences. However, some of the original files may have been removed to ensure easier handling of this project. Thus, in order to get the authentic experience, it is strongly recommended to use the original repositories in the provided links. """
def ask_user_for_weeknum(): weeknum = 0 while weeknum not in range(1,23): try: weeknum = int(input('Please enter the number of the week that we\'re in:')) if weeknum in range(1,23): break else: print('You did not enter a valid week number') #weeknum = int(input('Please enter the number of the week that we\'re in:')) except ValueError or UnboundLocalError: print('You did not enter a valid week number') print() weeknum = str(weeknum) if len(weeknum) == 1: weeknum = '0'+weeknum #print(weeknum) return weeknum #ask_user_for_weeknum()
message = input() new_message = '' index = 0 current_text = '' multiplier = '' while index < len(message): if message[index].isdigit(): multiplier += message[index] if index+1 < len(message): if message[index+1].isdigit(): multiplier += message[index+1] index += 1 multiplier = int(multiplier) new_message += current_text * multiplier index += 1 multiplier = '' current_text = '' continue current_text += message[index].upper() index += 1 print(f"Unique symbols used: {len(set(new_message))}") print(new_message)
load("//:import_external.bzl", import_external = "safe_wix_scala_maven_import_external") def dependencies(): import_external( name = "org_mongodb_mongodb_driver_reactivestreams", artifact = "org.mongodb:mongodb-driver-reactivestreams:1.11.0", jar_sha256 = "ae3d5eb3c51a0c286f43fe7ab0c52e3e0b385766f1b4dd82e06df1e617770764", srcjar_sha256 = "f3eb497f44ffc040d048c205d813c84846a3fc550a656110b1888a38797af77b", deps = [ "@org_mongodb_mongodb_driver_async", "@org_reactivestreams_reactive_streams" ], )
space_agencies = { "Australia": ['🇦🇺', 'ASA' , 'Australian Space Agency', 'https://en.wikipedia.org/wiki/Australian_Space_Agency', 2018, 'https://www.industry.gov.au/strategies-for-the-future/australian-space-agency'], "Belarus": ['🇧🇾', 'BSA', 'Belarus Space Agency', 'https://en.wikipedia.org/wiki/Belarus_Space_Agency', 2009, ''], "Costa Rica": ['🇨🇷', 'ACAE', "Asociación Centroamericana de Aeronáutica y el Espacio", 'https://en.wikipedia.org/wiki/Central_American_Association_for_Aeronautics_and_Space', 2010, 'https://www.acae-ca.org'], "Croatia": ['🇭🇷', 'HSA', 'Hrvatska Svemirska Agencija', 'https://en.wikipedia.org/wiki/Croatian_Space_Agency', 2007, ''], "Mexico": ['🇲🇽', 'AEM', 'Agencia Espacial Mexicana', 'https://en.wikipedia.org/wiki/Agencia_Espacial_Mexicana', 2010, 'https://www.gob.mx/aem'], "Algeria": ['🇩🇿', 'ASAL', 'الوكالة الفضائية الجزائرية', 'https://en.wikipedia.org/wiki/Algerian_Space_Agency', 2002, 'https://www.asal.dz'], "International": ['❔', 'APSCO', '亚太空间合作组织', 'https://en.wikipedia.org/wiki/Asia-Pacific_Space_Cooperation_Organization', 2005, 'http://www.apsco.int/'], "Austria": ['🇦🇹', 'ALR', 'Agentur für Luft- und Raumfahrt', 'https://en.wikipedia.org/wiki/Austrian_Space_Agency', 1972, 'https://www.ffg.at'], "Azerbaijan": ['🇦🇿', 'AMAKA', 'Azərbaycan Milli Aerokosmik Agentliyinin', 'https://en.wikipedia.org/wiki/Azerbaijan_National_Aerospace_Agency', 1974, 'https://web.archive.org/web/20090922155709/http://www.science.az/en/amaka/agentlik/index.htm'], "Bahrain": ['🇧🇭', 'NSSA', "Bahrain’s National Space Science Agency", 'https://en.wikipedia.org/wiki/Bahrain%E2%80%99s_National_Space_Science_Agency', 2014, 'https://www.nssa.gov.bh'], "Belgium": ['🇧🇪', 'IASB', "Institut d’Aéronomie Spatiale de Belgique", 'https://en.wikipedia.org/wiki/Belgian_Institute_for_Space_Aeronomy', 1964, 'https://www.aeronomie.be'], "Venezuela": ['🇻🇪', 'ABAE', 'Agencia Bolivariana para Actividades Espaciales', 'https://en.wikipedia.org/wiki/Bolivarian_Agency_for_Space_Activities', 2008, 'https://web.archive.org/web/20190103034749/http://abae.gob.ve/'], "Brazil": ['🇧🇷', 'AEB', 'Agência Espacial Brasileira', 'https://en.wikipedia.org/wiki/Brazilian_Space_Agency', 1994, 'http://www.aeb.gov.br/'], "United Kingdom": ['🇬🇧', 'UKSA', 'UK Space Agency', 'https://en.wikipedia.org/wiki/UK_Space_Agency', 2010, 'https://webarchive.nationalarchives.gov.uk/20100402172717/http%3A//www.ukspaceagency.bis.gov.uk/'], "Bolivia": ['🇧🇴', 'ABE', 'Agencia Boliviana Espacial', 'https://en.wikipedia.org/wiki/Bolivian_Space_Agency', 2012, 'https://www.abe.bo'], "Bulgaria": ['🇧🇬', 'ИКИ-БАН', ' Българска академия на науките', 'https://en.wikipedia.org/wiki/Bulgarian_Space_Agency', 1987, 'http://www.space.bas.bg/'], "Canada": ['🇨🇦', 'CSA', 'Canadian Space Agency', 'https://en.wikipedia.org/wiki/Canadian_Space_Agency', 1989, 'https://www.asc-csa.gc.ca/eng/'], "China": ['🇨🇳', 'CNSA', '国家航天局', 'https://en.wikipedia.org/wiki/China_National_Space_Administration', 1993, 'https://www.cnsa.gov.cn'], "Colombia": ['🇨🇴', 'CCE', 'Comisión Colombiana del Espacio', 'https://en.wikipedia.org/wiki/Colombian_Space_Commission', 2006, 'https://web.archive.org/web/20120731122014/http://www.cce.gov.co/'], "Singapore": ['🇸🇬', 'CRISP', 'Centre for Remote Imaging, Sensing and Processing', 'https://en.wikipedia.org/wiki/CRISP_NUS', 1995, 'https://www.crisp.nus.edu.sg'], "International²": ['❔', 'CCSDS', 'Consultative Committee for Space Data Systems', 'https://en.wikipedia.org/wiki/Consultative_Committee_for_Space_Data_Systems', 1982, 'https://public.ccsds.org/default.aspx'], "International³": ['❔', 'COSPAR', 'Committee on Space Research', 'https://en.wikipedia.org/wiki/COSPAR', 1958, 'https://web.archive.org/web/20080804051503/http://cosparhq.cnes.fr/'], "Czech Republic": ['🇨🇿', 'MTCR', 'Ministerstvo dopravy České republiky', 'https://cs.wikipedia.org/wiki/Ministerstvo_dopravy_%C4%8Cesk%C3%A9_republiky', 2003, 'https://www.czechspaceportal.cz/EN/'], "Denmark": ['🇩🇰', 'DRC', 'Danmarks Rumcenter', 'https://en.wikipedia.org/wiki/Danish_National_Space_Center', 1968, 'https://www.space.dtu.dk/english'], "Denmark²": ['🇩🇰', 'DRKI', 'Dansk Rumforskningsinstitut', 'https://en.wikipedia.org/wiki/Danish_Space_Research_Institute', 2005, ''], "ESA": ['❔', 'ESA', 'European Space Agency', 'https://en.wikipedia.org/wiki/European_Space_Agency', 1975, 'https://http://www.esa.int/'], "Thailand": ['🇹🇭', 'GISTDA', 'Geo-Informatics and Space Technology Development Agency', 'https://en.wikipedia.org/wiki/Geo-Informatics_and_Space_Technology_Development_Agency', 2002, 'https://www.gistda.or.th/main/'], "Serbia": ['🇷🇸', 'SERBSPACE', 'Serbian Office for Space Sciences, Research and Development', 'https://en.wikipedia.org/wiki/Serbian_Office_for_Space_Sciences,_Research_and_Development', 2016, 'https://www.serbspace.rs'], "Germany": ['🇩🇪', 'DLR', 'German Aerospace Center', 'https://en.wikipedia.org/wiki/German_Aerospace_Center', 1969, 'https://www.dlr.de/DE/Home/home_node.html'], "Hungary": ['🇭🇺', 'HSO', 'Hungarian Space Office', 'https://en.wikipedia.org/wiki/Hungarian_Space_Office', 1992, 'http://www.hso.hu/page.php?page=1'], "Greece": ['🇬🇷', 'ΕΛΚΕΔ', 'Ελληνικό Κέντρο Διαστήματος', 'https://en.wikipedia.org/wiki/Hellenic_Space_Center', 2019, 'https://hsc.gov.gr/el/'], "Spain": ['🇪🇸', 'INTA', 'Instituto Nacional de Técnica Aeroespacial', 'https://en.wikipedia.org/wiki/Instituto_Nacional_de_T%C3%A9cnica_Aeroespacial', 1942, 'https://www.inta.es/INTA/es/index.html'], "Iran": ['🇮🇷', 'ISA', 'Iranian Space Agency', 'https://en.wikipedia.org/wiki/Iranian_Space_Agency', 2004, 'https://http://www.isa.ir/'], "Israel": ['🇮🇱', 'ISA', 'Israeli Space Agency', 'https://en.wikipedia.org/wiki/Israeli_Space_Agency', 1983, 'https://www.space.gov.il/'], "Italy": ['🇮🇹', 'ASI', 'Italian Space Agency', 'https://en.wikipedia.org/wiki/Italian_Space_Agency', 1988, 'https://www.asi.it/'], "Japan": ['🇯🇵', 'JAXA', 'Japan Aerospace Exploration Agency', 'https://en.wikipedia.org/wiki/JAXA', 2003, 'https://www.jaxa.jp/'], "Luxembourg": ['🇱🇺', 'LSA', 'Luxembourg Space Agency', 'https://en.wikipedia.org/wiki/Luxembourg_Space_Agency', 2018, 'https://space-agency.public.lu/en.html'], "Kazakhstan": ['🇰🇿', 'NSA', 'National Space Agency (KazCosmos)', 'https://en.wikipedia.org/wiki/KazCosmos', 1991, ''], "New Zealand": ['🇳🇿', 'NZSA', 'New Zealand Space Agency', 'https://en.wikipedia.org/wiki/New_Zealand_Space_Agency', 2016, 'https://www.mbie.govt.nz/'], "North Korea": ['🇰🇵', 'KCST', 'Korean Committee of Space Technology', 'https://en.wikipedia.org/wiki/Korean_Committee_of_Space_Technology', 1980, ''], "North Korea²": ['🇰🇵', 'NADA', 'National Aerospace Development Administration', 'https://en.wikipedia.org/wiki/National_Aerospace_Development_Administration', 2013, ''], "South Korea": ['🇰🇷', 'KARI', 'Korea Aerospace Research Institute', 'https://en.wikipedia.org/wiki/Korea_Aerospace_Research_Institute', 1989, 'https://www.kari.kr/kor.do'], "Lithuania": ['🇱🇹', 'LSA', 'Lithuanian Space Association', 'https://en.wikipedia.org/wiki/Lithuanian_Space_Association', 2007, 'http://www.space-lt.eu'], "Malaysia": ['🇲🇾', 'MYSA', 'Malaysian Space Agency', 'https://en.wikipedia.org/wiki/Malaysian_Space_Agency', 2002, 'https://web.archive.org/web/20071022050706/http://www.angkasa.gov.my/welcome/index.html'], "United States": ['🇺🇸', 'NASA', 'National Aeronautics and Space Administration', 'https://en.wikipedia.org/wiki/NASA', 1958, 'https://www.nasa.gov/'], "Egypt": ['🇪🇬', 'NARSS', 'National Authority for Remote Sensing and Space Sciences', 'https://en.wikipedia.org/wiki/National_Authority_for_Remote_Sensing_and_Space_Sciences', 1994, 'https://http://www.narss.sci.eg/'], "Australia": ['🇦🇺', 'NSP', 'National Space Program', 'https://en.wikipedia.org/wiki/National_Space_Program', 1986, ''], "France": ['🇫🇷', 'CNES', "Centre National d'Études Spatiales", 'https://en.wikipedia.org/wiki/CNES', 1961, 'https://cnes.fr/fr/'], "Paraguay": ['🇵🇾', 'AEP', 'Agencia Espacial de Paraguay', 'https://en.wikipedia.org/wiki/Agencia_Espacial_del_Paraguay', 2014, 'https://www.aep.gov.py/'], "Peru": ['🇵🇪', 'CONIDA', "Comisión Nacional de Investigación y Desarrollo Aeroespacial", 'https://en.wikipedia.org/wiki/National_Commission_for_Aerospace_Research_and_Development', 1974, 'https://www.conida.gob.pe/'], "Philippines": ['🇵🇭', "PhilSA", 'Philippine Space Agency', 'https://en.wikipedia.org/wiki/Philippine_Space_Agency', 2019, ''], "Argentina": ['🇦🇷', 'CNIE', 'Comisión Nacional de Investigaciones Espaciales', 'https://en.wikipedia.org/wiki/Comisi%C3%B3n_Nacional_de_Actividades_Espaciales', 1961, 'https://www.argentina.gob.ar/ciencia/conae'], "Argentina²": ['🇦🇷', 'CONAE', 'Comisión Nacional de Actividades Espaciales', 'https://en.wikipedia.org/wiki/Comisi%C3%B3n_Nacional_de_Actividades_Espaciales', 1991, 'https://www.argentina.gob.ar/ciencia/conae'], "Indonesia": ['🇮🇩', 'LAPAN', 'National Institute of Aeronautics and Space', 'https://en.wikipedia.org/wiki/National_Institute_of_Aeronautics_and_Space', 1964, 'https://web.archive.org/web/20110421183755/http://lapan.go.id/'], "Mongolia": ['🇲🇳', 'NRSC', 'National Remote Sensing Center of Mongolia', 'https://en.wikipedia.org/wiki/National_Remote_Sensing_Center_of_Mongolia', 1987, ''], "Tunisia": ['🇹🇳', 'CNCT', 'المركز الوطني للإستشعار عن بعد‎', 'https://en.wikipedia.org/wiki/Centre_national_de_la_cartographie_et_de_la_t%C3%A9l%C3%A9d%C3%A9tection', 1988, 'https://www.cnct.defense.tn'], "Uzbekistan": ['🇺🇿', 'USSRA', 'Uzbek State Space Research Agency (UzbekCosmos)', 'https://en.wikipedia.org/wiki/UzbekCosmos', 2001, ''], "Ukraine": ['🇺🇦', 'NSAU', 'National Space Agency of Ukraine', 'https://en.wikipedia.org/wiki/National_Space_Agency_of_Ukraine', 1992, 'https://www.nkau.gov.ua/ua/'], "Taiwan": ['🇹🇼', 'NSPO', 'National Space Organization', 'https://en.wikipedia.org/wiki/National_Space_Organization', 1991, 'https://www.nspo.org.tw'], "Nigeria": ['🇳🇬', 'NASRDA', 'National Space Research and Development Agency', 'https://en.wikipedia.org/wiki/National_Space_Research_and_Development_Agency', 1998, 'https://nasrda.gov.ng/en/'], "Netherlands": ['🇳🇱', 'SRON', 'Netherlands Institute for Space Research', 'https://en.wikipedia.org/wiki/Netherlands_Institute_for_Space_Research', 1983, 'https://www.sron.nl/'], "Norway": ['🇳🇴', 'NRS', 'Norsk Romsenter', 'https://en.wikipedia.org/wiki/Norwegian_Space_Agency', 1987, 'https://www.romsenter.no/eng'], "Pakistan": ['🇵🇰', 'SUPARCO', 'Pakistan Space and Upper Atmosphere Research Commission', 'https://en.wikipedia.org/wiki/Space_%26_Upper_Atmosphere_Research_Commission', 1961, 'https://http://www.suparco.gov.pk/'], "Portugal": ['🇵🇹', 'Portugal Space', 'Portugal Space', 'https://en.wikipedia.org/wiki/Portugal_Space', 2019, ''], "Romania": ['🇷🇴', 'ASR', 'Agenţia Spaţialǎ Românǎ', 'https://en.wikipedia.org/wiki/Romanian_Space_Agency', 1991, 'https://http://www.rosa.ro/index.php/en/'], "Egypt²": ['🇪🇬', 'EASRT-RSC', 'Egypt Remote Sensing Center', 'https://en.wikipedia.org/wiki/Egypt_Remote_Sensing_Center', 1971, ''], "Morocco": ['🇲🇦', 'CRTS', 'المركز الملكي للإستشعار البعدي الفضائي‎', 'https://en.wikipedia.org/wiki/Royal_Center_for_Remote_Sensing', 1989, ''], "Russia": ['🇷🇺', 'ROSCOSMOS', 'Russian Federal Space Agency', 'https://en.wikipedia.org/wiki/Roscosmos', 1992, 'https://http://www.roscosmos.ru/'], "Turkey": ['🇹🇷', 'TUA', 'Türkiye Uzay Ajansı', 'https://en.wikipedia.org/wiki/Turkish_Space_Agency', 2018, ''], "Soviet Union": ['🟥', 'CCCP', 'Soviet Space Program', 'https://en.wikipedia.org/wiki/Soviet_space_program', 1955, ''], "Bangladesh": ['🇧🇩', 'SPARRSO', 'Space Research and Remote Sensing Organization', 'https://en.wikipedia.org/wiki/Space_Research_and_Remote_Sensing_Organization', 1980, 'https://http://sparrso.gov.bd/'], "Poland": ['🇵🇱', 'POLSA', 'Polish Space Agency', 'https://en.wikipedia.org/wiki/Polish_Space_Agency', 2014, 'https://polsa.gov.pl/'], "South Africa": ['🇿🇦', 'SANSA', 'South African National Space Agency', 'https://en.wikipedia.org/wiki/South_African_National_Space_Agency', 2010, 'https://www.sansa.org.za/'], "Saudi Arabia": ['🇸🇦', 'KACST-SRI', 'معهد بحوث الفضاء', 'https://en.wikipedia.org/wiki/Space_Research_Institute_of_Saudi_Arabia', '__', 'https://http://www.kacst.edu.sa/'], "Vietnam": ['🇻🇳', 'VAST-STI', 'Viện Công nghệ vũ trụ Việt Nam', 'https://en.wikipedia.org/wiki/Vi%E1%BB%87n_C%C3%B4ng_ngh%E1%BB%87_v%C5%A9_tr%E1%BB%A5_Vi%E1%BB%87t_Nam', 2006, 'https://http://www.vast.ac.vn/'], "Sweden": ['🇸🇪', 'SNSA', 'Swedish National Space Agency', 'https://en.wikipedia.org/wiki/Swedish_National_Space_Agency', 1972, 'https://www.rymdstyrelsen.se/'], "Switzerland": ['🇨🇭', 'SSO', 'Swiss Space Office', 'https://en.wikipedia.org/wiki/Swiss_Space_Office', 1998, 'https://www.turkmencosmos.gov.tm/'], "Turkmenistan": ['🇹🇲', 'TNSA', 'Turkmenistan National Space Agency', 'https://en.wikipedia.org/wiki/Turkmenistan_National_Space_Agency', 2011, ''], "United Nations": ['🇺🇳', 'UNOOSA', 'United Nations Office for Outer Space Affairs', 'https://en.wikipedia.org/wiki/United_Nations_Office_for_Outer_Space_Affairs', 1958, 'https://http://www.unoosa.org/'], "International¹¹": ['❔', 'UNCOPUOS', 'United Nations Committee on the Peaceful Uses of Outer Space', 'https://en.wikipedia.org/wiki/United_Nations_Committee_on_the_Peaceful_Uses_of_Outer_Space', 1959, 'https://http://www.unoosa.org/oosa/en/ourwork/copuos/index.html'], "United Arab Emirates": ['🇦🇪', 'UAESA', 'United Arab Emirates Space Agency', 'https://en.wikipedia.org/wiki/United_Arab_Emirates_Space_Agency', 2014, 'https://www.space.gov.ae/'], "United Arab Emirates²": ['🇦🇪', 'MBRSC', 'Mohammed bin Rashid Space Centre', 'https://en.wikipedia.org/wiki/Mohammed_bin_Rashid_Space_Centre', 2015, 'https://mbrsc.ae/en'], "United States²": ['🇺🇸', 'USSF', 'United States Space Force', 'https://en.wikipedia.org/wiki/United_States_Space_Force', 2019, 'https://www.spaceforce.mil/'], "Syria": ['🇸🇾', 'SSA', 'Syrian Space Agency', 'https://en.wikipedia.org/wiki/Syrian_Space_Agency', 2014, 'https://www.facebook.com/syriaspace'] }
#Cengiz Ermis - 170401019 with open("veriler.txt", "r", encoding='utf-8') as file: array = [] for i in file.read().split(): array.append(int(i)) uz = len(array) yToplam = sum(array) def xitoplam(uz): xKareToplam = [] xKareToplam.append(uz) for i in range(1,13): value = 0 for j in range(uz): value = value + ((j + 1) ** i) xKareToplam.append(value) return xKareToplam def xiyiToplam(uz,array): xi_yi_toplam = [] xi_yi_toplam.append(sum(array)) for i in range(1 ,7 ,1): value = 0 for j in range(uz): value = value + ((j + 1) ** i * array[j]) xi_yi_toplam.append(value) return xi_yi_toplam #Elementer satır islemleri icin gerekli fonksiyon. def gaussElimination(mx): s = len(mx) for i in range(0 ,s): max = abs(mx[i][i]) maxRow = i for t in range(i + 1 ,s): if (abs(mx[t][i]) > max): max = abs(mx[t][i]) maxRow = t for t in range(i ,s + 1): temp = mx[maxRow][t] mx[maxRow][k] = mx[i][t] mx[i][t] = temp for t in range(i + 1 ,s): c = -mx[t][i] / mx[i][i] for j in range(i ,n + 1): if i == j: mx[t][j] = 0 else: mx[t][j] = mx[t][j] + (c * mx[i][j]) result = [0 for i in range(s)] for i in range(s-1 ,-1 ,-1): result[i] = mx[i][s] / mx[i][i] for t in range(i-1 ,-1 ,-1): mx[t][s] = mx[t][s] - (mx[t][i] * result[i]) return result #Matrisi olusturma. def createMx(uz ,array ,m): x , y = xitoplam(uz) , xiyiToplam(uz ,array) mx , row = [] , 0 for i in range(0,m): eklenecekSatir=[] for i in range(row ,m+row): eklenecekSatir.append(x[i]) eklenecekSatir.append(y[row]) row += 1 mx.append(eklenecekSatir) return mx #Matrisi cagırma ve ekleme yapma. def call(array): x = [] for i in range(2,8): x.append(gaussElimination(createMx(len(array),array,i))) return x mx = call(array) def calculateCorrelation(x ,array ,n): sr = 0 st = 0 yToplam=sum(array) y = yToplam / n size = len(x) for i in range(n): temp = 0 for j in range(size): if j == 0: temp = temp + x[j] else: temp = temp + (x[j]*(i+1)**j) sr = sr + ((array[i]-temp)**2) st = st + ((array[i]-y)**2) result = ((st-sr)/st)**(1/2) return result array = [] for i in range(0,6): x = calculateCorrelation(mx[i],array,uz) array.append(x) lastArray = sorted(array) def bestCorrelation(correlation): supreme = max(correlation) counter = 1 while(supreme!=correlation[counter - 1]): counter = counter + 1 return counter pol = mx[bestCorrelation(array) - 1] def f(x,pol): return(pol[0] + pol[1]*x + pol[2]*x**2 + pol[3]*x**3 + pol[4]*x**4 + pol[5]*x**5 + pol[6]*x**6) def polinomluIntegral(array): a=9 b=len(array) deltax = 0.1 integral = 0 n = int((b - a)/deltax) for i in range(n): integral = deltax * (f(a) + f(a+deltax)) / 2+integral a = a + deltax return integral def polinomsuzIntegral(array): a = 9 b = len(array) deltax = 1 integral = 0 n = int((b - a) / deltax) for i in range(n-1): integral += deltax * (array[a] + array[a + deltax]) / 2 a = a + deltax return integral print("Polinomlu integral : ",polinomluIntegral(array)) print("Polinomsuz integral : ",polinomsuzIntegral(array)) with open("170401019_yorum.txt","w",encoding='utf-8') as file: file.write("Cengiz Ermis 170401019 \n") file.write("İntegral sonuçlarının farklı çıkma sebebi deltax'e verilen değerden kaynaklanır.\n" ) file.write("Eğer deltax'i küçültürsek hesaplanan alan artacaktır bu sebeple hesaplanan değer gerçeğe daha yakınlaşmış olur.\n") file.write("Bu yüzden polinomlu integral gerçeğe daha yakın bir sonuç verir. \n") file.write("Polinomsuz hesaplamada istediğimiz kadar parçaya bölemediğimiz için hata oranı daha fazladır.\n")
#-*-coding:utf8;-*- #qpy:console print('\n') print('-' * 5, 'AUMENTO NO SALÁRIO', '-' * 5) print('\n') s = float(input('Digite o seu salário: ')) if s > 1250: sr = (s * 0.10) + s print('\n') print(' SALÁRIO: {:.2f} \n AUMENTO: {:.2f} \n SALÁRIO REAJUSTADO: {:.2f}'.format(s, (s * 0.10), sr)) elif s <= 1250: sr = (s * 0.15) + s print('\n') print(' SALÁRIO: {:.2f} \n AUMENTO: {:.2f} \n SALÁRIO REAJUSTADO: {:.2f}'.format(s, (s * 0.15), sr)) else: print('\n') print('ERRO!')
""" [2017-11-10] Challenge #339 [Hard] Severing the Power Grid https://www.reddit.com/r/dailyprogrammer/comments/7c4bju/20171110_challenge_339_hard_severing_the_power/ # Description In energy production, the power grid is a a large directed graph of energy consumers and producers. At times you need to cut at certain nodes and trim demand because you cannot supply enough of a load. In DailyProgrammeropolis, all buildings are connected to the grid and all consume power to varying degrees. Some generate power because they have installed on-site generation and sell the excess to the grid, some do not. The scenario you're facing is this: due to a fault with the bulk power generation facility not local to DailyProgrammerololis, you must trim the power grid. You have connectivity data, and power consumption and production data. Your goal with this challenge is to **maximize the number of powered nodes with the generated energy you have**. Note that when you cut off a node, you run the risk the downstream ones will loose power, too, if they are no longer connected. This is how you'll shed demand, by selectively cutting the graph. You can make as many cuts as you want (there is no restriction on this). # Input Description You'll be given an extensive set of data for this challenge. The first set of data looks like this: you'll be given a single integer on one line telling you how many nodes to read. Then you'll be given those nodes, one per line, with the node ID, the amount of power it consumes in kWH, then how much the node generates in kWH. Not all nodes produce electricity, but some do (e.g. a wind farm, solar cells, etc), and there is obviously one that generates the most - that's your main power plant. The next set of data is the edge data. The first line is how many edges to read, then the next *N* lines have data showing how the nodes are connected (e.g. power flows from node a to b). Example: 3 0 40.926 0.0 1 36.812 1.552 2 1.007 0.0 2 0 1 0 2 # Output Description Your program should emit a list of edges to sever as a list of (i,j) two tuples. Multiple answers are possible. You may wind up with a number of small islands as opposed to one powered network. # Challenge Input 101 0 1.926 0.0 1 36.812 0.0 2 1.007 0.0 3 6.812 0.0 4 1.589 0.0 5 1.002 0.0 6 1.531 0.0 7 2.810 0.0 8 1.246 0.0 9 5.816 0.0 10 1.167 0.0 11 1.357 0.0 12 1.585 0.0 13 1.117 0.0 14 3.110 1.553 15 2.743 0.0 16 1.282 0.0 17 1.154 0.0 18 1.160 0.0 19 1.253 0.0 20 1.086 0.0 21 1.148 0.0 22 1.357 0.0 23 2.161 0.0 24 1.260 0.0 25 2.241 0.0 26 2.970 0.0 27 6.972 0.0 28 2.443 0.0 29 1.255 0.0 30 1.844 0.0 31 2.503 0.0 32 1.054 0.0 33 1.368 0.0 34 1.011 1.601 35 1.432 0.0 36 1.061 1.452 37 1.432 0.0 38 2.011 0.0 39 1.232 0.0 40 1.767 0.0 41 1.590 0.0 42 2.453 0.0 43 1.972 0.0 44 1.445 0.0 45 1.197 0.0 46 2.497 0.0 47 3.510 0.0 48 12.510 0.0 49 3.237 0.0 50 1.287 0.0 51 1.613 0.0 52 1.776 0.0 53 2.013 0.0 54 1.079 0.0 55 1.345 1.230 56 1.613 0.0 57 2.243 0.0 58 1.209 0.0 59 1.429 0.0 60 7.709 0.0 61 1.282 8.371 62 1.036 0.0 63 1.086 0.0 64 1.087 0.0 65 1.000 0.0 66 1.140 0.0 67 1.210 0.0 68 1.080 0.0 69 1.087 0.0 70 1.399 0.0 71 2.681 0.0 72 1.693 0.0 73 1.266 0.0 74 1.234 0.0 75 2.755 0.0 76 2.173 0.0 77 1.093 0.0 78 1.005 0.0 79 1.420 0.0 80 1.135 0.0 81 1.101 0.0 82 1.187 1.668 83 2.334 0.0 84 2.054 3.447 85 1.711 0.0 86 2.083 0.0 87 2.724 0.0 88 1.654 0.0 89 1.608 0.0 90 1.033 17.707 91 1.017 0.0 92 1.528 0.0 93 1.278 0.0 94 1.128 0.0 95 1.508 1.149 96 5.123 0.0 97 2.000 0.0 98 1.426 0.0 99 1.802 0.0 100 2.995 98.606 Edge data is too much to put up here. You can download it [here](https://github.com/paralax/ColossalOpera/blob/master/hard/microgrid_edges.txt). """ def main(): pass if __name__ == "__main__": main()
def delete_date_symbols(date,dateFormat): if(dateFormat == 'YYYY-MM-DD HH:MM:SS'): year = date[0:4] month = date[5:7] day = date[8:10] hours = date[11:13] minutes = date[14:16] seconds = date[17:19] formattedDate=year+month+day+hours+minutes+seconds return formattedDate else: return 'pass a date formatted as YYYY-MM-DD HH:MM:SS'
#!/usr/bin/env python """ Copyright 2012 Wordnik, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. """ class AudioFile: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.""" def __init__(self): self.swaggerTypes = { 'attributionUrl': 'str', 'commentCount': 'int', 'voteCount': 'int', 'fileUrl': 'str', 'audioType': 'str', 'id': 'long', 'duration': 'float', 'attributionText': 'str', 'createdBy': 'str', 'description': 'str', 'createdAt': 'datetime', 'voteWeightedAverage': 'float', 'voteAverage': 'float', 'word': 'str' } self.attributionUrl = None # str self.commentCount = None # int self.voteCount = None # int self.fileUrl = None # str self.audioType = None # str self.id = None # long self.duration = None # float self.attributionText = None # str self.createdBy = None # str self.description = None # str self.createdAt = None # datetime self.voteWeightedAverage = None # float self.voteAverage = None # float self.word = None # str
class SendCharacters: """ ユーザーがボタンを押下したときにイベントハンドラに引数として送信される文字列 """ AC = "$" DIVI = "/" MULTI = "*" PLUS = "+" MINUS = "-" ONE = "1" TWO = "2" THREE = "3" FOUR = "4" FIVE = "5" SIX = "6" SEVEN = "7" EIGHT = "8" NINE = "9" ZERO = "0" DECIMAL = "." EQUAL = "="
class Solution: def countAndSay(self, n: int) -> str: if n == 1: return "1" prev = "1" for i in range(1, n): res = "" val = prev[0] count = 1 for i in range(1, len(prev)): if prev[i] == val: count += 1 else: res += str(count) + val val = prev[i] count =1 res += str(count) + val prev = res return res
begin_unit comment|'# Copyright 2014 OpenStack Foundation' nl|'\n' comment|'# All Rights Reserved.' nl|'\n' comment|'#' nl|'\n' comment|'# Licensed under the Apache License, Version 2.0 (the "License"); you may' nl|'\n' comment|'# not use this file except in compliance with the License. You may obtain' nl|'\n' comment|'# a copy of the License at' nl|'\n' comment|'#' nl|'\n' comment|'# http://www.apache.org/licenses/LICENSE-2.0' nl|'\n' comment|'#' nl|'\n' comment|'# Unless required by applicable law or agreed to in writing, software' nl|'\n' comment|'# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT' nl|'\n' comment|'# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the' nl|'\n' comment|'# License for the specific language governing permissions and limitations' nl|'\n' comment|'# under the License.' nl|'\n' string|'"""\nFake nodes for Ironic host manager tests.\n"""' newline|'\n' nl|'\n' name|'from' name|'nova' name|'import' name|'objects' newline|'\n' nl|'\n' nl|'\n' DECL|variable|COMPUTE_NODES name|'COMPUTE_NODES' op|'=' op|'[' nl|'\n' name|'objects' op|'.' name|'ComputeNode' op|'(' nl|'\n' name|'id' op|'=' number|'1' op|',' name|'local_gb' op|'=' number|'10' op|',' name|'memory_mb' op|'=' number|'1024' op|',' name|'vcpus' op|'=' number|'1' op|',' nl|'\n' name|'vcpus_used' op|'=' number|'0' op|',' name|'local_gb_used' op|'=' number|'0' op|',' name|'memory_mb_used' op|'=' number|'0' op|',' nl|'\n' name|'updated_at' op|'=' name|'None' op|',' name|'cpu_info' op|'=' string|"'baremetal cpu'" op|',' nl|'\n' DECL|variable|host name|'host' op|'=' string|"'host1'" op|',' nl|'\n' name|'hypervisor_hostname' op|'=' string|"'node1uuid'" op|',' name|'host_ip' op|'=' string|"'127.0.0.1'" op|',' nl|'\n' name|'hypervisor_version' op|'=' number|'1' op|',' name|'hypervisor_type' op|'=' string|"'ironic'" op|',' nl|'\n' DECL|variable|stats name|'stats' op|'=' name|'dict' op|'(' name|'ironic_driver' op|'=' nl|'\n' string|'"nova.virt.ironic.driver.IronicDriver"' op|',' nl|'\n' DECL|variable|cpu_arch name|'cpu_arch' op|'=' string|"'i386'" op|')' op|',' nl|'\n' DECL|variable|supported_hv_specs name|'supported_hv_specs' op|'=' op|'[' name|'objects' op|'.' name|'HVSpec' op|'.' name|'from_list' op|'(' nl|'\n' op|'[' string|'"i386"' op|',' string|'"baremetal"' op|',' string|'"baremetal"' op|']' op|')' op|']' op|',' nl|'\n' name|'free_disk_gb' op|'=' number|'10' op|',' name|'free_ram_mb' op|'=' number|'1024' op|',' nl|'\n' name|'cpu_allocation_ratio' op|'=' number|'16.0' op|',' name|'ram_allocation_ratio' op|'=' number|'1.5' op|',' nl|'\n' DECL|variable|disk_allocation_ratio name|'disk_allocation_ratio' op|'=' number|'1.0' op|')' op|',' nl|'\n' name|'objects' op|'.' name|'ComputeNode' op|'(' nl|'\n' name|'id' op|'=' number|'2' op|',' name|'local_gb' op|'=' number|'20' op|',' name|'memory_mb' op|'=' number|'2048' op|',' name|'vcpus' op|'=' number|'1' op|',' nl|'\n' name|'vcpus_used' op|'=' number|'0' op|',' name|'local_gb_used' op|'=' number|'0' op|',' name|'memory_mb_used' op|'=' number|'0' op|',' nl|'\n' name|'updated_at' op|'=' name|'None' op|',' name|'cpu_info' op|'=' string|"'baremetal cpu'" op|',' nl|'\n' DECL|variable|host name|'host' op|'=' string|"'host2'" op|',' nl|'\n' name|'hypervisor_hostname' op|'=' string|"'node2uuid'" op|',' name|'host_ip' op|'=' string|"'127.0.0.1'" op|',' nl|'\n' name|'hypervisor_version' op|'=' number|'1' op|',' name|'hypervisor_type' op|'=' string|"'ironic'" op|',' nl|'\n' DECL|variable|stats name|'stats' op|'=' name|'dict' op|'(' name|'ironic_driver' op|'=' nl|'\n' string|'"nova.virt.ironic.driver.IronicDriver"' op|',' nl|'\n' DECL|variable|cpu_arch name|'cpu_arch' op|'=' string|"'i386'" op|')' op|',' nl|'\n' DECL|variable|supported_hv_specs name|'supported_hv_specs' op|'=' op|'[' name|'objects' op|'.' name|'HVSpec' op|'.' name|'from_list' op|'(' nl|'\n' op|'[' string|'"i386"' op|',' string|'"baremetal"' op|',' string|'"baremetal"' op|']' op|')' op|']' op|',' nl|'\n' name|'free_disk_gb' op|'=' number|'20' op|',' name|'free_ram_mb' op|'=' number|'2048' op|',' nl|'\n' name|'cpu_allocation_ratio' op|'=' number|'16.0' op|',' name|'ram_allocation_ratio' op|'=' number|'1.5' op|',' nl|'\n' DECL|variable|disk_allocation_ratio name|'disk_allocation_ratio' op|'=' number|'1.0' op|')' op|',' nl|'\n' name|'objects' op|'.' name|'ComputeNode' op|'(' nl|'\n' name|'id' op|'=' number|'3' op|',' name|'local_gb' op|'=' number|'30' op|',' name|'memory_mb' op|'=' number|'3072' op|',' name|'vcpus' op|'=' number|'1' op|',' nl|'\n' name|'vcpus_used' op|'=' number|'0' op|',' name|'local_gb_used' op|'=' number|'0' op|',' name|'memory_mb_used' op|'=' number|'0' op|',' nl|'\n' name|'updated_at' op|'=' name|'None' op|',' name|'cpu_info' op|'=' string|"'baremetal cpu'" op|',' nl|'\n' DECL|variable|host name|'host' op|'=' string|"'host3'" op|',' nl|'\n' name|'hypervisor_hostname' op|'=' string|"'node3uuid'" op|',' name|'host_ip' op|'=' string|"'127.0.0.1'" op|',' nl|'\n' name|'hypervisor_version' op|'=' number|'1' op|',' name|'hypervisor_type' op|'=' string|"'ironic'" op|',' nl|'\n' DECL|variable|stats name|'stats' op|'=' name|'dict' op|'(' name|'ironic_driver' op|'=' nl|'\n' string|'"nova.virt.ironic.driver.IronicDriver"' op|',' nl|'\n' DECL|variable|cpu_arch name|'cpu_arch' op|'=' string|"'i386'" op|')' op|',' nl|'\n' DECL|variable|supported_hv_specs name|'supported_hv_specs' op|'=' op|'[' name|'objects' op|'.' name|'HVSpec' op|'.' name|'from_list' op|'(' nl|'\n' op|'[' string|'"i386"' op|',' string|'"baremetal"' op|',' string|'"baremetal"' op|']' op|')' op|']' op|',' nl|'\n' name|'free_disk_gb' op|'=' number|'30' op|',' name|'free_ram_mb' op|'=' number|'3072' op|',' nl|'\n' name|'cpu_allocation_ratio' op|'=' number|'16.0' op|',' name|'ram_allocation_ratio' op|'=' number|'1.5' op|',' nl|'\n' DECL|variable|disk_allocation_ratio name|'disk_allocation_ratio' op|'=' number|'1.0' op|')' op|',' nl|'\n' name|'objects' op|'.' name|'ComputeNode' op|'(' nl|'\n' name|'id' op|'=' number|'4' op|',' name|'local_gb' op|'=' number|'40' op|',' name|'memory_mb' op|'=' number|'4096' op|',' name|'vcpus' op|'=' number|'1' op|',' nl|'\n' name|'vcpus_used' op|'=' number|'0' op|',' name|'local_gb_used' op|'=' number|'0' op|',' name|'memory_mb_used' op|'=' number|'0' op|',' nl|'\n' name|'updated_at' op|'=' name|'None' op|',' name|'cpu_info' op|'=' string|"'baremetal cpu'" op|',' nl|'\n' DECL|variable|host name|'host' op|'=' string|"'host4'" op|',' nl|'\n' name|'hypervisor_hostname' op|'=' string|"'node4uuid'" op|',' name|'host_ip' op|'=' string|"'127.0.0.1'" op|',' nl|'\n' name|'hypervisor_version' op|'=' number|'1' op|',' name|'hypervisor_type' op|'=' string|"'ironic'" op|',' nl|'\n' DECL|variable|stats name|'stats' op|'=' name|'dict' op|'(' name|'ironic_driver' op|'=' nl|'\n' string|'"nova.virt.ironic.driver.IronicDriver"' op|',' nl|'\n' DECL|variable|cpu_arch name|'cpu_arch' op|'=' string|"'i386'" op|')' op|',' nl|'\n' DECL|variable|supported_hv_specs name|'supported_hv_specs' op|'=' op|'[' name|'objects' op|'.' name|'HVSpec' op|'.' name|'from_list' op|'(' nl|'\n' op|'[' string|'"i386"' op|',' string|'"baremetal"' op|',' string|'"baremetal"' op|']' op|')' op|']' op|',' nl|'\n' name|'free_disk_gb' op|'=' number|'40' op|',' name|'free_ram_mb' op|'=' number|'4096' op|',' nl|'\n' name|'cpu_allocation_ratio' op|'=' number|'16.0' op|',' name|'ram_allocation_ratio' op|'=' number|'1.5' op|',' nl|'\n' DECL|variable|disk_allocation_ratio name|'disk_allocation_ratio' op|'=' number|'1.0' op|')' op|',' nl|'\n' comment|'# Broken entry' nl|'\n' name|'objects' op|'.' name|'ComputeNode' op|'(' nl|'\n' name|'id' op|'=' number|'5' op|',' name|'local_gb' op|'=' number|'50' op|',' name|'memory_mb' op|'=' number|'5120' op|',' name|'vcpus' op|'=' number|'1' op|',' nl|'\n' name|'host' op|'=' string|"'fake'" op|',' name|'cpu_info' op|'=' string|"'baremetal cpu'" op|',' nl|'\n' DECL|variable|stats name|'stats' op|'=' name|'dict' op|'(' name|'ironic_driver' op|'=' nl|'\n' string|'"nova.virt.ironic.driver.IronicDriver"' op|',' nl|'\n' DECL|variable|cpu_arch name|'cpu_arch' op|'=' string|"'i386'" op|')' op|',' nl|'\n' DECL|variable|supported_hv_specs name|'supported_hv_specs' op|'=' op|'[' name|'objects' op|'.' name|'HVSpec' op|'.' name|'from_list' op|'(' nl|'\n' op|'[' string|'"i386"' op|',' string|'"baremetal"' op|',' string|'"baremetal"' op|']' op|')' op|']' op|',' nl|'\n' name|'free_disk_gb' op|'=' number|'50' op|',' name|'free_ram_mb' op|'=' number|'5120' op|',' nl|'\n' DECL|variable|hypervisor_hostname name|'hypervisor_hostname' op|'=' string|"'fake-hyp'" op|')' op|',' nl|'\n' op|']' newline|'\n' nl|'\n' DECL|variable|SERVICES name|'SERVICES' op|'=' op|'[' nl|'\n' name|'objects' op|'.' name|'Service' op|'(' name|'host' op|'=' string|"'host1'" op|',' name|'disabled' op|'=' name|'False' op|')' op|',' nl|'\n' name|'objects' op|'.' name|'Service' op|'(' name|'host' op|'=' string|"'host2'" op|',' name|'disabled' op|'=' name|'True' op|')' op|',' nl|'\n' name|'objects' op|'.' name|'Service' op|'(' name|'host' op|'=' string|"'host3'" op|',' name|'disabled' op|'=' name|'False' op|')' op|',' nl|'\n' name|'objects' op|'.' name|'Service' op|'(' name|'host' op|'=' string|"'host4'" op|',' name|'disabled' op|'=' name|'False' op|')' op|',' nl|'\n' op|']' newline|'\n' nl|'\n' nl|'\n' DECL|function|get_service_by_host name|'def' name|'get_service_by_host' op|'(' name|'host' op|')' op|':' newline|'\n' indent|' ' name|'services' op|'=' op|'[' name|'service' name|'for' name|'service' name|'in' name|'SERVICES' name|'if' name|'service' op|'.' name|'host' op|'==' name|'host' op|']' newline|'\n' name|'return' name|'services' op|'[' number|'0' op|']' newline|'\n' dedent|'' endmarker|'' end_unit
# # @lc app=leetcode id=771 lang=python3 # # [771] Jewels and Stones # # @lc code=start class Solution: def numJewelsInStones(self, J: str, S: str) -> int: jewels = set(J) number_jewels = 0 for char in S: if char in jewels: number_jewels += 1 return number_jewels # return (1 if char in jewels else 0 for char in jewels) # oneline solution # @lc code=end
#Odd numbers for number in range(1,21,2): print(number)
imie = str(input('podaj imie palo:')) nazwisko = str(input('nazwisko:')) telefon = int(input('numer 😏:')) with open('wizytowka.txt', 'w') as f: f.write(f'imie: {imie}\n') f.write(f'nazwisko: {nazwisko}\n') f.write(f'nr. telefonu: {telefon}\n')
# Copyright (C) 2019 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Noop function used to override rules we don't want to support in standalone. def _noop_override(**kwargs): pass PERFETTO_CONFIG = struct( # This is used to refer to deps within perfetto's BUILD files. # In standalone and bazel-based embedders use '//', because perfetto has its # own repository, and //xxx would be relative to @perfetto//xxx. # In Google internal builds, instead, this is set to //third_party/perfetto, # because perfetto doesn't have its own repository there. root = "//", # These variables map dependencies to perfetto third-party projects. This is # to allow perfetto embedders (e.g. gapid) and google internal builds to # override paths and target names to their own third_party. deps = struct( # Target exposing the build config header. It should be a valid # cc_library dependency as it will become a dependency of every # perfetto_cc_library target. It needs to expose a # "perfetto_build_flags.h" file that can be included via: # #include "perfetto_build_flags.h". build_config = ["//:build_config_hdr"], zlib = ["@perfetto_dep_zlib//:zlib"], jsoncpp = ["@perfetto_dep_jsoncpp//:jsoncpp"], linenoise = ["@perfetto_dep_linenoise//:linenoise"], sqlite = ["@perfetto_dep_sqlite//:sqlite"], sqlite_ext_percentile = ["@perfetto_dep_sqlite_src//:percentile_ext"], protoc = ["@com_google_protobuf//:protoc"], protoc_lib = ["@com_google_protobuf//:protoc_lib"], protobuf_lite = ["@com_google_protobuf//:protobuf_lite"], protobuf_full = ["@com_google_protobuf//:protobuf"], ), # This struct allows embedders to customize the cc_opts for Perfetto # 3rd party dependencies. They only have an effect if the dependencies are # initialized with the Perfetto build files (i.e. via perfetto_deps()). deps_copts = struct( zlib = [], jsoncpp = [], linenoise = [], sqlite = [], ), # Allow Bazel embedders to change the visibility of "public" targets. # This variable has been introduced to limit the change to Bazel and avoid # making the targets fully public in the google internal tree. public_visibility = [ "//visibility:public", ], # Allow Bazel embedders to change the visibility of the proto targets. # This variable has been introduced to limit the change to Bazel and avoid # making the targets public in the google internal tree. proto_library_visibility = "//visibility:private", # This struct allows the embedder to customize copts and other args passed # to rules like cc_binary. Prefixed rules (e.g. perfetto_cc_binary) will # look into this struct before falling back on native.cc_binary(). # This field is completely optional, the embedder can omit the whole # |rule_overrides| or invidivual keys. They are assigned to None or noop # actions here just for documentation purposes. rule_overrides = struct( cc_binary = None, cc_library = None, cc_proto_library = None, # Supporting java rules pulls in the JDK and generally is not something # we need for most embedders. java_proto_library = _noop_override, java_lite_proto_library = _noop_override, proto_library = None, py_binary = None, # We only need this for internal binaries. No other embeedder should # care about this. gensignature_internal_only = None, ), )
#! /usr/bin/env python # -*- python -*- # -*- coding: utf-8 -*- lang = { "lang": "estonian", # should be in english "flPoint_comma": True, # floating point symbol is `,` instead `.` "translator": "Jüri Kormik" } messages = { "program.ext": [".json", ".pickle"], "program.title": "Lihtne mõõtühikute teisendaja", "program.author": "Autor", "program.version": "Versioon", "program.err.title": "Andmefail salvestamata", "program.err.text": "Andmefail on salvestamata.\nKas oled kindel, et soovid programmi sulgeda?", # Statusbar messages "status.saving_mode": ["<POLE>", " JSON ", "PICKLE"], "status.no_datafile": "Andmefaili ei leitud.", "status.data_saved": "Andmefail salvestatud.", "status.selected_list": "Valitud mõõtühikute loend:  ", "status.added_list": "Lisatud mõõtühikute loend:  ", "status.list_exists": "Lisatav mõõtühikute loend on juba olemas.", "status.selected_unit": "Valitud mõõtühik:  ", "status.added_unit": "Lisatud mõõtühik:  ", "status.unit_exists": "Lisatav mõõtühik on juba olemas.", "status.added_multiplier": "Lisatud/Muudetud kordaja:  ", "status.selected_from": "Valitud mõõtühik millele:  ", "status.selected_to": "Valitud mõõtühik millelt:  ", # Universal button texts "button.close": "Sulge", "button.add": "Lisa", "button.change": "Lisa/Muuda", "button.cancel": "Lõpeta", "button.save": "Salvesta", # Frame texts "main.button.convert": "Mõõtühikute teisendaja", "main.button.units": "Lisa/Muuda mõõtühikuid", "main.button.translate": "Tõlgi mõõtühikud", "main.button.save": "Salvesta andmed", "main.button.about": "Programmist", "converter.button.calc": "Arvuta", "units.label.units_list": "Ühikute loend", "units.label.base": "Baasühik (infoks)", "units.label.converter": "Mõõtühiku teisendus", "units.label.unit": "Mõõtühik", "units.label.multiplier": "Kordaja", "translation.label.to_lang": "Keelele", "translation.label.translation": "Tõlge", }
load("@npm//@bazel/typescript:index.bzl", "ts_library") def ng_ts_library(**kwargs): ts_library( compiler = "//libraries/angular-tools:tsc_wrapped_with_angular", supports_workers = True, use_angular_plugin = True, **kwargs )
# Copyright (C) 2013 - 2016 - Oscar Campos <[email protected]> # This program is Free Software see LICENSE file for details class StubProcess(object): """Self descriptive class name, right? """ def __init__(self, interpreter): self._process = None self._interpreter = None def start(self): """Just returns True and does nothing """ return True
#!/usr/bin/env python3 # # author : Michael Brockus.   # contact: <mailto:[email protected]> # license: Apache 2.0 :http://www.apache.org/licenses/LICENSE-2.0 # # copyright 2020 The Meson-UI development team # class OutputConsole: def __init__(self, context=None): self._context = context def append_line(self, text: str) -> None: if text == '': return cursor = self._context.output_console.textCursor() self._context.output_console.setTextCursor(cursor) cursor.setPosition(cursor.Start) cursor.movePosition(cursor.Left, cursor.KeepAnchor, 3) self._context.output_console.ensureCursorVisible() def command_run(self, text: str): self._context.output_console.setPlainText(text) self.append_line(text)
def comb(n, k): if n - k < k: k = n - k if k == 0: return 1 a = 1 b = 1 for i in range(k): a *= n - i b *= i + 1 return a // b N, P = map(int, input().split()) A = list(map(int, input().split())) odds = sum(a % 2 for a in A) evens = len(A) - odds print(sum(comb(odds, i) for i in range(P, odds + 1, 2)) * (2 ** evens))
class Solution: def medianSlidingWindow(self, nums: List[int], k: int) -> List[float]: if k == 0: return [] win = sorted(nums[:k]) ans = [] for i in range(k, len(nums) + 1): median = (win[k // 2] + win[(k - 1) // 2]) / 2.0 ans.append(median) if i == len(nums): break # get the index of the nums[i-k] and then delete it, then insort nums[i] index = bisect.bisect_left(win, nums[i - k]) win.pop(index) bisect.insort_left(win, nums[i]) return ans
# https://codeforces.com/problemset/problem/230/A s, n = [int(x) for x in input().split()] dragons = [] new_dragons = [] for _ in range(n): x, y = [int(x) for x in input().split()] dragons.append([x, y]) dragons.sort() for row in range(n - 1): current_row = dragons[row] next_row = dragons[row + 1] if current_row[0] == next_row[0]: if current_row[1] < next_row[1]: dragons[row], dragons[row + 1] = dragons[row + 1], dragons[row] else: continue # print(dragons) bool_var = True for row in dragons: if s > row[0]: s += row[1] else: print('NO') bool_var = False break if bool_var: print('YES')
# # PySNMP MIB module NMS-EPON-ONU-RESET (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/NMS-EPON-ONU-RESET # Produced by pysmi-0.3.4 at Mon Apr 29 20:12:13 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ValueSizeConstraint, ConstraintsUnion, ConstraintsIntersection, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsUnion", "ConstraintsIntersection", "ValueRangeConstraint") nmsEPONGroup, = mibBuilder.importSymbols("NMS-SMI", "nmsEPONGroup") PortList, = mibBuilder.importSymbols("Q-BRIDGE-MIB", "PortList") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") Bits, NotificationType, IpAddress, Integer32, Gauge32, ModuleIdentity, Unsigned32, iso, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter32, TimeTicks, Counter64, ObjectIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "NotificationType", "IpAddress", "Integer32", "Gauge32", "ModuleIdentity", "Unsigned32", "iso", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter32", "TimeTicks", "Counter64", "ObjectIdentity") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") nmsEponOnuReset = MibIdentifier((1, 3, 6, 1, 4, 1, 11606, 10, 101, 25)) nmsEponOnuResetTable = MibTable((1, 3, 6, 1, 4, 1, 11606, 10, 101, 25, 1), ) if mibBuilder.loadTexts: nmsEponOnuResetTable.setStatus('mandatory') nmsEponOnuResetEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11606, 10, 101, 25, 1, 1), ).setIndexNames((0, "NMS-EPON-ONU-RESET", "onuLlid")) if mibBuilder.loadTexts: nmsEponOnuResetEntry.setStatus('mandatory') onuLlid = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 101, 25, 1, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: onuLlid.setStatus('mandatory') onuReset = MibTableColumn((1, 3, 6, 1, 4, 1, 11606, 10, 101, 25, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("no_action", 0), ("reset", 1)))).setMaxAccess("writeonly") if mibBuilder.loadTexts: onuReset.setStatus('mandatory') mibBuilder.exportSymbols("NMS-EPON-ONU-RESET", nmsEponOnuResetEntry=nmsEponOnuResetEntry, onuLlid=onuLlid, nmsEponOnuResetTable=nmsEponOnuResetTable, nmsEponOnuReset=nmsEponOnuReset, onuReset=onuReset)
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # def duplicate_edges_in_reverse(graph): """ Takes in a directed multi graph, and creates duplicates of all edges, the duplicates having reversed direction to the originals. This is useful since directed edges constrain the direction of messages passed. We want to permit omni-directional message passing. :param graph: The graph :return: The graph with duplicated edges, reversed, with all original edge properties attached to the duplicates """ for sender, receiver, keys, data in graph.edges(data=True, keys=True): graph.add_edge(receiver, sender, keys, **data) return graph def apply_logits_to_graphs(graph, logits_graph): """ Take in a graph that describes the logits of the graph of interest, and store those logits on the graph as the property 'logits'. The graphs must correspond with one another Args: graph: Graph to apply logits to logits_graph: Graph containing logits Returns: graph with logits added as property 'logits' """ for node, data in logits_graph.nodes(data=True): graph.nodes[node]['logits'] = list(data['features']) # TODO This is the desired implementation, but the graphs are altered by the model to have duplicated reversed # edges, so this won't work for now # for sender, receiver, keys, data in logit_graph.edges(keys=True, data=True): # graph.edges[sender, receiver, keys]['logits'] = list(data['features']) for sender, receiver, keys, data in graph.edges(keys=True, data=True): data['logits'] = list(logits_graph.edges[sender, receiver, keys]['features']) return graph
# -*- coding: utf-8 -*- ''' File name: code\sums_of_power_sums\sol_487.py Author: Vaidic Joshi Date created: Oct 20, 2018 Python Version: 3.x ''' # Solution to Project Euler Problem #487 :: Sums of power sums # # For more information see: # https://projecteuler.net/problem=487 # Problem Statement ''' Let fk(n) be the sum of the kth powers of the first n positive integers. For example, f2(10) = 12 + 22 + 32 + 42 + 52 + 62 + 72 + 82 + 92 + 102 = 385. Let Sk(n) be the sum of fk(i) for 1 ≤ i ≤ n. For example, S4(100) = 35375333830. What is ∑ (S10000(1012) mod p) over all primes p between 2 ⋅ 109 and 2 ⋅ 109 + 2000? ''' # Solution # Solution Approach ''' '''
def centuryFromYear(year): remainer = year % 100 if remainer == 0: return year/100 else: return int(year/100)+1
""" Crie um programa que leia dois valores e mostre um menu como o abaixo na tela: [ 1 ] Somar [ 2 ] Multiplicar [ 3 ] Maior [ 4 ] Novos Números [ 5 ] Sair do Programa Seu programa deverá realizar a operação solicitada em cada caso. """ num1 = int(input('Digite um valor: ')) num2 = int(input('Digite outro valor: ')) while True: print('----------------------------------') resp = int(input('O que deseja fazer: \n' '[ 1 ] Somar\n' '[ 2 ] Multiplicar\n' '[ 3 ] Maior\n' '[ 4 ] Novos Números\n' '[ 5 ] Sair do Programa\n' 'RESPOSTA: ')) if resp == 1: print(f'A soma foi: {num1 + num2}.') elif resp == 2: print(f'O produto foi: {num1 * num2}.') elif resp == 3: if num1 > num2: print(f'O {num1} é maior que o {num2}.') else: print(f'O {num2} é maior que o {num1}.') elif resp == 4: num1 = int(input('Digite um valor: ')) num2 = int(input('Digite outro valor: ')) elif resp == 5: print('FINALIZANDO...') break else: print('Digite um número de 1 a 5!')
#Christine Logan #9/10/2017 #CS 3240 #Lab 3: Pre-lab #hello.py def greeting(msg): print(msg) def salutation(msg): print(msg) if __name__ == "__main__": greeting("hello") salutation("goodbye")
# TODO: to be deleted class FieldMock: def __init__(self): self.find = lambda _: FieldMock() self.skip = lambda _: FieldMock() self.limit = lambda _: FieldMock() class BeaconMock: def __init__(self): self.datasets = FieldMock() class DBMock: def __init__(self): self.beacon = BeaconMock() client = DBMock()
class SecurityKeyError(Exception): def __init__(self, message): super().__init__(message) class ListenError(Exception): def __init__(self, message): super().__init__(message) class ChildError(Exception): def __init__(self, message): super().__init__(message)
def main(): single_digit = 36 teens = 70 second_digit = 46 hundred = 7 nd = 3 thousand = 11 a = single_digit * (10 * 19) a += second_digit * 10 * 10 a += teens * 10 a += hundred * 900 a += nd * 891 a += thousand print(a) main()
class CreditCard: def __init__(self, cc_number, expiration, security_code): self.cc_number = cc_number self.expiration = expiration self.security_code = security_code class Charge: def __init__(self, success, error=''): self.success = success self.error = error
{ 'targets': [ { 'target_name': 'xxhash', 'cflags!': [ '-fno-exceptions' ], 'cflags_cc!': [ '-fno-exceptions' ], 'xcode_settings': { 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES', 'CLANG_CXX_LIBRARY': 'libc++', 'MACOSX_DEPLOYMENT_TARGET': '10.7', }, 'msvs_settings': { 'VCCLCompilerTool': { 'ExceptionHandling': 1 }, }, 'sources': [ 'lib/binding/xxhash_binding.cc', 'deps/lz4/lib/xxhash.h', 'deps/lz4/lib/xxhash.c', ], 'include_dirs': [ '<!(node -p "require(\'node-addon-api\').include_dir")', ], 'cflags': [ '-O3' ], }, { 'target_name': 'lz4', 'cflags!': [ '-fno-exceptions' ], 'cflags_cc!': [ '-fno-exceptions' ], 'xcode_settings': { 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES', 'CLANG_CXX_LIBRARY': 'libc++', 'MACOSX_DEPLOYMENT_TARGET': '10.7', }, 'msvs_settings': { 'VCCLCompilerTool': { 'ExceptionHandling': 1 }, }, 'sources': [ 'lib/binding/lz4_binding.cc', 'deps/lz4/lib/lz4.h', 'deps/lz4/lib/lz4.c', 'deps/lz4/lib/lz4hc.h', 'deps/lz4/lib/lz4hc.c', ], 'include_dirs': [ '<!(node -p "require(\'node-addon-api\').include_dir")', ], 'cflags': [ '-O3' ], }, ], }
class Solution: def canCross(self, stones): memo, stones, target = {}, set(stones), stones[-1] def dfs(unit, last): if unit == target: return True if (unit, last) not in memo: memo[(unit, last)] = any(dfs(unit + move, move) for move in (last - 1, last, last + 1) if move and unit + move in stones) return memo[(unit, last)] return dfs(1, 1) if 1 in stones else False
# Print recebe Strings como argumentos ou coisas que podem ser convertidas em strings umFloat = 3.14 print("Numero convertido para string", umFloat) print("Hello World") print() # São aceitos varias strings ou uma conjunta print("Hello", "World") print("Hello" + "World") print("Podemos notar que a diferença entre uma grande string e varias quando passadas para a função é que: ") print("Passando varios argumentos existe um espacamento automatico entre eles e passando apenas 1 a string é apresentada do jeito que foi mandada") # O input sempre é uma String entrada = input("Digite um numero") print("Tipo da entrada é ", type(entrada)) print("(ERRADO)Entrada vezes 2 =",entrada*2) #Note que a saida não foi o dobro do numero mas sim duas o que foi digitado # Para podermos trabalhar com numericos devemos convertar antes entrada = float(entrada) print("Tipo da entrada é ", type(entrada)) print("Entrada vezes 2 =",entrada*2)
path2file = sys.argv[1] file = open(path2file, 'r') while True: line = file.readline() if not line: break stroka = unicode(line, 'utf-8') type('f', KeyModifier.CTRL) sleep(1) paste(stroka) sleep(1) type(Key.ENTER) sleep(1) break exit(0)
class Solution: def lengthOfLongestSubstring(self, s: str) -> int: longestSubstring = 0 start = -1 end = 0 characterSet = set() stringLength = len(s) while start < stringLength and end < stringLength: currentChar = s[end] if currentChar in characterSet: start += 1 characterToRemove = s[start] characterSet.remove(characterToRemove) longestSubstring = max(longestSubstring, end - start) else: characterSet.add(currentChar) longestSubstring = max(longestSubstring, end - start) end += 1 return longestSubstring
def Swap(a,b): temp = a a=b b=temp lst = [a,b] return lst
class Solution(object): def removeDuplicates(self, nums): """ :type nums: List[int] :rtype: int """ ind = 0 pos = 0 while ind < len(nums): if ind > 0 and ind < len(nums) and nums[ind] == nums[ind - 1]: ind += 1 continue nums[pos] = nums[ind] pos += 1 ind += 1 return pos if __name__ == "__main__": sol = Solution() sol.removeDuplicates([1,2,2,2])
class Solution(object): def kthSmallest(self, root, k): """ :type root: TreeNode :type k: int :rtype: int """ if not root: return 0 stack = [root] count, curr = 0, root while stack: if curr.left: stack.append(curr.left) curr = curr.left else: val = stack.pop() count += 1 if count == k: return val.val if val.right: stack.append(val.right) curr = val.right return float('-inf')
""" Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. """ __author__ = 'sfaci' ##Singlelton (The borg) pattern recipe from: # http://code.activestate.com/recipes/66531/ class Status: """ the purpose of this class is to keep track of which artifacts have already been deployed and what hasn't. ie. try to only build an artifact once. """ __shared_state = {} __deployed__ = {} @staticmethod def __build_key__(artifact, version, lang="java", compiler="thrift"): return artifact + "-" + version + "-" + lang + "-" + compiler def is_deployed(self, artifact, version, lang="java", compiler="thrift"): """ expected format of "artifact" is artifact-version """ id = self.__build_key__(artifact, version, lang, compiler) return self.__deployed__.has_key(id) def add_artifact(self, artifact, version, lang="java", compiler="thrift"): id = self.__build_key__(artifact, version, lang, compiler) self.__deployed__[id] = id def __init__(self): """ Create singleton instance """ # Check whether we already have an instance self.__dict__ = self.__shared_state
# 5 # 5 3 # 1 5 2 6 1 # 1 6 # 6 # 3 2 # 1 2 3 # 4 3 # 3 1 2 3 # 10 3 # 1 2 3 4 5 6 7 8 9 10 i = int(input()) l = [] for j in range(i): k = list(map(int,(input().split(' ')))) il = list(map(int,input().split(' '))) if k[1] in il and len(il)==1: l.append('yes') elif k[1] in il[1:] and len(il) % 2 == 1: l.append('yes') elif k[1] in il[1:-1] and len(il) % 2 == 0: l.append('yes') else: l.append('no') for t in l: print(t)
class Solution: def minTimeToVisitAllPoints(self, points: List[List[int]]) -> int: now = points[0] ans = 0 for point in points[1:]: ans += max(abs(now[0] - point[0]), abs(now[1] - point[1])) now = point return ans
# Runtime: 176 ms, faster than 97.52% of Python3 online submissions for Set Mismatch. # Memory Usage: 15.9 MB, less than 42.22% of Python3 online submissions for Set Mismatch. def find_error_nums(nums: [int]) -> [int]: """You have a set of integers s, which originally contains all the numbers from 1 to n. Unfortunately, due to some error, one of the numbers in s got duplicated to another number in the set, which results in repetition of one number and loss of another number. You are given an integer array nums representing the data status of this set after the error. Find the number that occurs twice and the number that is missing and return them in the form of an array. """ # since we that all the number are between 1 and n, one number is missing and another is repeated twice # then the sum of the set(nums) would give us the sum of all nums in nums - the repeated number # ( since a set does not store repeated numbers) -> from that we get the repeated number nums_set_sum = sum(set(nums)) repeated_num = sum(nums) - nums_set_sum # if we subtract the sum of the set of the given numbers from the sum of all numbers in range 0,n # we obtain the missing number missing_num = sum(i for i in range(len(nums) + 1)) - nums_set_sum # return repeated_num and missing_num return [repeated_num, missing_num] # Example 1: # Input: nums = [1,2,2,4] # Output: [2,3] assert find_error_nums([1, 2, 2, 4]), [2, 3] # Example 2: # Input: nums = [1,1] # Output: [1,2] assert find_error_nums([1, 1]), [1, 2]
# Write a Python class which has two methods get_String and print_String.... # get_String accept a string from the user and print_String print the string in upper case. class IOString(): def __init__(self): self.str1 = "" def get_String(self): self.str1 = input() def print_String(self): print(self.str1.upper()) str1 = IOString() str1.get_String() str1.print_String()
##################### ### Base classes. ### ##################### class room: repr = "room" m_description = "You are in a simple room." def __init__(self, contents=[]): self.contents = contents def __str__(self): s = "" for object in self.contents: s += " " + str(object) return self.m_description + s def __repr__(self): return self.repr ###################### ### Child classes. ### ###################### class blue_room(room): repr = "b. room" m_description = "You are in a blue room." class red_room(room): repr = "r. room" m_description = "You are in a red room." class green_room(room): repr = "g. room" m_description = "You are in a green room." class final_room(room): repr = "goal" m_description = "You found the hidden room!"
# Source # ====== # https://www.hackerrank.com/contests/projecteuler/challenges/euler008 # # Problem # ======= # Find the greatest product of K consecutive digits in the N digit number. # # Input Format # ============ # First line contains T that denotes the number of test cases. # First line of each test case will contain two integers N & K. # Second line of each test case will contain a N digit integer. # # Constraints # ============ # 1 <= T <= 100 # 1<= K <= 7 # K <= N <= 1000 # # Output Format # ============= # Print the required answer for each test case. def product(num_subset): p = 1 for i in num_subset: p *= i return p t = int(input().strip()) for _ in range(t): n,k = input().strip().split(' ') n,k = [int(n),int(k)] num = input().strip() p = [] for i in range(n-k): num_subset = [int(x) for x in list(num[i:k+i])] p.append(product(num_subset)) print(max(p))