bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def AT_SPIFF (self, n, E_MeV_u, particle_no, fluence_cm2, material_no, RDD_model, RDD_parameters, ER_model, ER_parameters, gamma_model, gamma_parameters, N2, fluence_factor, write_output, shrink_tails, shrink_tails_under, adjust_N2, lethal_events_mode): ''' Computes HCP response and RE/RBE using compound Poison proces...
def AT_SPIFF (self, n, E_MeV_u, particle_no, fluence_cm2, material_no, RDD_model, RDD_parameters, ER_model, ER_parameters, gamma_model, gamma_parameters, N2, fluence_factor, write_output, shrink_tails, shrink_tails_under, adjust_N2, lethal_events_mode): ''' Computes HCP response and RE/RBE using compound Poison proces...
454,900
def AT_SPISS (self, n, E_MeV_u, particle_no, fluence_cm2, material_no, RDD_model, RDD_parameters, ER_model, ER_parameters, gamma_model, gamma_parameters, n_runs, N2, fluence_factor, write_output, importance_sampling): ''' Computes HCP response and RE/RBE using compound Poison process and statistical sampling (CPP_SS,...
def AT_SPISS (self, n, E_MeV_u, particle_no, fluence_cm2, material_no, RDD_model, RDD_parameters, ER_model, ER_parameters, gamma_model, gamma_parameters, n_runs, N2, fluence_factor, write_output, importance_sampling): ''' Computes HCP response and RE/RBE using compound Poison process and statistical sampling (CPP_SS,...
454,901
def AT_GSM (self, n, E_MeV_u, particle_no, fluence_cm2, material_no, RDD_model, RDD_parameters, ER_model, ER_parameters, gamma_model, gamma_parameters, N_runs, N2, fluence_factor, write_output, nX, voxel_size_m, lethal_events_mode): ''' Computes HCP response and RE/RBE using summation of tracks an a Cartesian grid (the...
def AT_GSM (self, n, E_MeV_u, particle_no, fluence_cm2, material_no, RDD_model, RDD_parameters, ER_model, ER_parameters, gamma_model, gamma_parameters, N_runs, N2, fluence_factor, write_output, nX, voxel_size_m, lethal_events_mode): ''' Computes HCP response and RE/RBE using summation of tracks an a Cartesian grid (the...
454,902
def AT_IGK (self, n, E_MeV_u, particle_no, fluence_cm2, material_no, RDD_model, RDD_parameters, ER_model, ER_parameters, gamma_model, gamma_parameters, saturation_cross_section_factor): ''' Computes HCP response and RE/RBE using Katz\' Ion-Gamma-Kill approach according to Waligorski, 1988
def AT_IGK (self, n, E_MeV_u, particle_no, fluence_cm2, material_no, RDD_model, RDD_parameters, ER_model, ER_parameters, gamma_model, gamma_parameters, saturation_cross_section_factor): ''' Computes HCP response and RE/RBE using Katz\' Ion-Gamma-Kill approach according to Waligorski, 1988
454,903
def AT_IGK (self, n, E_MeV_u, particle_no, fluence_cm2, material_no, RDD_model, RDD_parameters, ER_model, ER_parameters, gamma_model, gamma_parameters, saturation_cross_section_factor): ''' Computes HCP response and RE/RBE using Katz\' Ion-Gamma-Kill approach according to Waligorski, 1988
def AT_IGK (self, n, E_MeV_u, particle_no, fluence_cm2, material_no, RDD_model, RDD_parameters, ER_model, ER_parameters, gamma_model, gamma_parameters, saturation_cross_section_factor): ''' Computes HCP response and RE/RBE using Katz\' Ion-Gamma-Kill approach according to Waligorski, 1988
454,904
def AT_IGK (self, n, E_MeV_u, particle_no, fluence_cm2, material_no, RDD_model, RDD_parameters, ER_model, ER_parameters, gamma_model, gamma_parameters, saturation_cross_section_factor): ''' Computes HCP response and RE/RBE using Katz\' Ion-Gamma-Kill approach according to Waligorski, 1988
def AT_IGK (self, n, E_MeV_u, particle_no, fluence_cm2, material_no, RDD_model, RDD_parameters, ER_model, ER_parameters, gamma_model, gamma_parameters, saturation_cross_section_factor): ''' Computes HCP response and RE/RBE using Katz\' Ion-Gamma-Kill approach according to Waligorski, 1988
454,905
def run(self): ''' runs AT_SPIFF algorithm ''' self.results = self.AT_SPIFF(self.number_particles, self.E_MeV_u, self.particle_no, self.fluence_cm2, self.material_no, self.RDD_model, self.RDD_parameters, self.ER_model, self.ER_parameters, self.gamma_model, self.gamma_parameters, self.N2, self.fluence_factor, self.write...
def run(self): ''' runs AT_SPIFF algorithm ''' self.results = self.AT_SPIFF(self.number_particles, self.E_MeV_u, self.particle_no, self.fluence_cm2, self.material_no, self.RDD_model, self.RDD_parameters, self.ER_model, self.ER_parameters, self.gamma_model, self.gamma_parameters, self.N2, self.fluence_factor, self.write...
454,906
def run(self): ''' RUN AT_IGK ''' self.results = self.AT_IGK(self.number_particles, self.E_MeV_u, self.particle_no, self.fluence_cm2, self.material_no, self.RDD_model, self.RDD_parameters, self.ER_model, self.ER_parameters, self.gamma_model, self.gamma_parameters, self.saturation_cross_section_factor) self.efficency = ...
def run(self): ''' RUN AT_IGK ''' self.results = self.AT_IGK(self.number_particles, self.E_MeV_u, self.particle_no, self.fluence_cm2, self.material_no, self.RDD_model, self.RDD_parameters, self.ER_model, self.ER_parameters, self.gamma_model, self.gamma_parameters, self.saturation_cross_section_factor) self.efficency = ...
454,907
def run(self): ''' RUN AT_IGK ''' self.results = self.AT_IGK(self.number_particles, self.E_MeV_u, self.particle_no, self.fluence_cm2, self.material_no, self.RDD_model, self.RDD_parameters, self.ER_model, self.ER_parameters, self.gamma_model, self.gamma_parameters, self.saturation_cross_section_factor) self.efficency = ...
def run(self): ''' RUN AT_IGK ''' self.results = self.AT_IGK(self.number_particles, self.E_MeV_u, self.particle_no, self.fluence_cm2, self.material_no, self.RDD_model, self.RDD_parameters, self.ER_model, self.ER_parameters, self.gamma_model, self.gamma_parameters, self.saturation_cross_section_factor) self.efficency = ...
454,908
def run(self): ''' runs AT_GSM algorithm ''' self.results = self.AT_GSM(self.number_particles, self.E_MeV_u, self.particle_no, self.fluence_cm2, self.material_no, self.RDD_model, self.RDD_parameters, self.ER_model, self.ER_parameters, self.gamma_model, self.gamma_parameters, self.n_runs, self.n2, self.fluence_factor, s...
def run(self): ''' runs AT_GSM algorithm ''' self.results = self.AT_GSM(self.number_particles, self.E_MeV_u, self.particle_no, self.fluence_cm2, self.material_no, self.RDD_model, self.RDD_parameters, self.ER_model, self.ER_parameters, self.gamma_model, self.gamma_parameters, self.n_runs, self.n2, self.fluence_factor, s...
454,909
def run(self): ''' runs AT_SPISS algorithm ''' self.results = self.AT_SPISS(self.number_particles, self.E_MeV_u, self.particle_no, self.fluence_cm2, self.material_no, self.RDD_model, self.RDD_parameters, self.ER_model, self.ER_parameters, self.gamma_model, self.gamma_parameters, self.n_runs, self.n2, self.fluence_facto...
def run(self): ''' runs AT_SPISS algorithm ''' self.results = self.AT_SPISS(self.number_particles, self.E_MeV_u, self.particle_no, self.fluence_cm2, self.material_no, self.RDD_model, self.RDD_parameters, self.ER_model, self.ER_parameters, self.gamma_model, self.gamma_parameters, self.n_runs, self.n2, self.fluence_facto...
454,910
def test_suite(): ''' test script for pyamtrack, runs all functions in a row ''' print'\n----------\n- pyamtrack test run\n----------\n\n'
def test_suite(): ''' test script for pyamtrack, runs all functions in a row ''' print'\n----------\n- pyamtrack test run\n----------\n\n'
454,911
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
454,912
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
454,913
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
454,914
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
454,915
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
454,916
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
454,917
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
454,918
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
454,919
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
454,920
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
454,921
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
454,922
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
454,923
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
454,924
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
454,925
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
defcamel_convert(name):s1=re.sub('(.)([A-Z][a-z]+)',r'\1_\2',name)returnre.sub('([a-z0-9])([A-Z])',r'\1_\2',s1).lower()
454,926
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
defcamel_convert(name):s1=re.sub('(.)([A-Z][a-z]+)',r'\1_\2',name)returnre.sub('([a-z0-9])([A-Z])',r'\1_\2',s1).lower()
454,927
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
454,928
def camel_convert(name): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
defcamel_convert(name):s1=re.sub('(.)([A-Z][a-z]+)',r'\1_\2',name)returnre.sub('([a-z0-9])([A-Z])',r'\1_\2',s1).lower()
454,929
def mismatch(x,y): return abs(x-y)/max(1.0,abs(x)) > 1e-12
def mismatch(x,y): return abs(x-y)/max(1.0,abs(x)) > 1e-4
454,930
def main(): if 0 == me: if MIRROR: print ' Performing tests on Mirrored Arrays' print ' GA initialized' # note that MA is not used, so no need to initialize it # "import ga" registers malloc/free as memory allocators internally #if nproc-1 == me: if 0 == me: print 'using %d process(es) %d custer nodes' % ( nproc, ga....
def main(): if 0 == me: if MIRROR: print ' Performing tests on Mirrored Arrays' print ' GA initialized' # note that MA is not used, so no need to initialize it # "import ga" registers malloc/free as memory allocators internally #if nproc-1 == me: if 0 == me: print 'using %d process(es) %d custer nodes' % ( nproc, ga....
454,931
def main(): if 0 == me: if MIRROR: print ' Performing tests on Mirrored Arrays' print ' GA initialized' # note that MA is not used, so no need to initialize it # "import ga" registers malloc/free as memory allocators internally #if nproc-1 == me: if 0 == me: print 'using %d process(es) %d custer nodes' % ( nproc, ga....
def main(): if 0 == me: if MIRROR: print ' Performing tests on Mirrored Arrays' print ' GA initialized' # note that MA is not used, so no need to initialize it # "import ga" registers malloc/free as memory allocators internally #if nproc-1 == me: if 0 == me: print 'using %d process(es) %d custer nodes' % ( nproc, ga....
454,932
def main(): if 0 == me: if MIRROR: print ' Performing tests on Mirrored Arrays' print ' GA initialized' # note that MA is not used, so no need to initialize it # "import ga" registers malloc/free as memory allocators internally #if nproc-1 == me: if 0 == me: print 'using %d process(es) %d custer nodes' % ( nproc, ga....
def main(): if 0 == me: if MIRROR: print ' Performing tests on Mirrored Arrays' print ' GA initialized' # note that MA is not used, so no need to initialize it # "import ga" registers malloc/free as memory allocators internally #if nproc-1 == me: if 0 == me: print 'using %d process(es) %d custer nodes' % ( nproc, ga....
454,933
def check(gatype, nptype): n = 256 m = 2*n a = np.zeros((n,n), dtype=nptype) b = np.zeros((n,n), dtype=nptype) maxloop = 100 maxproc = 4096 num_restricted = 0 restricted_list = 0 iproc = me % lprocs nloop = min(maxloop,n) if USE_RESTRICTED: num_restricted = nproc/2 restricted_list = [0]*num_restricted if (num_restricte...
def check(gatype, nptype): n = 256 m = 2*n a = np.zeros((n,n), dtype=nptype) b = np.zeros((n,n), dtype=nptype) maxloop = 100 num_restricted = 0 restricted_list = 0 iproc = me % lprocs nloop = min(maxloop,n) if USE_RESTRICTED: num_restricted = nproc/2 restricted_list = [0]*num_restricted if (num_restricted == 0): num_re...
454,934
def check(gatype, nptype): n = 256 m = 2*n a = np.zeros((n,n), dtype=nptype) b = np.zeros((n,n), dtype=nptype) maxloop = 100 maxproc = 4096 num_restricted = 0 restricted_list = 0 iproc = me % lprocs nloop = min(maxloop,n) if USE_RESTRICTED: num_restricted = nproc/2 restricted_list = [0]*num_restricted if (num_restricte...
def check(gatype, nptype): n = 256 m = 2*n a = np.zeros((n,n), dtype=nptype) b = np.zeros((n,n), dtype=nptype) maxloop = 100 maxproc = 4096 num_restricted = 0 restricted_list = 0 iproc = me % lprocs nloop = min(maxloop,n) if USE_RESTRICTED: num_restricted = nproc/2 restricted_list = [0]*num_restricted if (num_restricte...
454,935
def check(gatype, nptype): n = 256 m = 2*n a = np.zeros((n,n), dtype=nptype) b = np.zeros((n,n), dtype=nptype) maxloop = 100 maxproc = 4096 num_restricted = 0 restricted_list = 0 iproc = me % lprocs nloop = min(maxloop,n) if USE_RESTRICTED: num_restricted = nproc/2 restricted_list = [0]*num_restricted if (num_restricte...
def check(gatype, nptype): n = 256 m = 2*n a = np.zeros((n,n), dtype=nptype) b = np.zeros((n,n), dtype=nptype) maxloop = 100 maxproc = 4096 num_restricted = 0 restricted_list = 0 iproc = me % lprocs nloop = min(maxloop,n) if USE_RESTRICTED: num_restricted = nproc/2 restricted_list = [0]*num_restricted if (num_restricte...
454,936
def check(gatype, nptype): n = 256 m = 2*n a = np.zeros((n,n), dtype=nptype) b = np.zeros((n,n), dtype=nptype) maxloop = 100 maxproc = 4096 num_restricted = 0 restricted_list = 0 iproc = me % lprocs nloop = min(maxloop,n) if USE_RESTRICTED: num_restricted = nproc/2 restricted_list = [0]*num_restricted if (num_restricte...
def check(gatype, nptype): n = 256 m = 2*n a = np.zeros((n,n), dtype=nptype) b = np.zeros((n,n), dtype=nptype) maxloop = 100 maxproc = 4096 num_restricted = 0 restricted_list = 0 iproc = me % lprocs nloop = min(maxloop,n) if USE_RESTRICTED: num_restricted = nproc/2 restricted_list = [0]*num_restricted if (num_restricte...
454,937
def main(): if 4 != nproc and 0 == me: ga.error('Program requires 4 GA processes') test1D() test2D() if 0 == me: print 'All tests successful'
def main(): if 4 != nproc and 0 == me: ga.error('Program requires 4 GA processes') test1D() if 0 == me: print 'All tests successful'
454,938
def time_get(g_a, lo, hi, buf, chunk, jump, local): count = 0 rows = hi[0]-lo[0] cols = hi[1]-lo[1] shifti = [rows, 0, rows] shiftj = [0, cols, cols] seconds = time.time() # distance between consecutive patches increased by jump # to destroy locality of reference for ilo in range(lo[0], hi[0]-chunk-jump+1, chunk+jump):...
def time_get(g_a, lo, hi, buf, chunk, jump, local): count = 0 rows = hi[0]-lo[0] cols = hi[1]-lo[1] shifti = [rows, 0, rows] shiftj = [0, cols, cols] seconds = time.time() # distance between consecutive patches increased by jump # to destroy locality of reference for ilo in range(lo[0], hi[0]-chunk-jump+1, chunk+jump):...
454,939
def time_put(g_a, lo, hi, buf, chunk, jump, local): count = 0 rows = hi[0]-lo[0] cols = hi[1]-lo[1] shifti = [rows, 0, rows] shiftj = [0, cols, cols] seconds = time.time() # distance between consecutive patches increased by jump # to destroy locality of reference for ilo in range(lo[0], hi[0]-chunk-jump+1, chunk+jump):...
def time_put(g_a, lo, hi, buf, chunk, jump, local): count = 0 rows = hi[0]-lo[0] cols = hi[1]-lo[1] shifti = [rows, 0, rows] shiftj = [0, cols, cols] seconds = time.time() # distance between consecutive patches increased by jump # to destroy locality of reference for ilo in range(lo[0], hi[0]-chunk-jump+1, chunk+jump):...
454,940
def time_acc(g_a, lo, hi, buf, chunk, jump, local): count = 0 rows = hi[0]-lo[0] cols = hi[1]-lo[1] shifti = [rows, 0, rows] shiftj = [0, cols, cols] seconds = time.time() # distance between consecutive patches increased by jump # to destroy locality of reference for ilo in range(lo[0], hi[0]-chunk-jump+1, chunk+jump):...
def time_acc(g_a, lo, hi, buf, chunk, jump, local): count = 0 rows = hi[0]-lo[0] cols = hi[1]-lo[1] shifti = [rows, 0, rows] shiftj = [0, cols, cols] seconds = time.time() # distance between consecutive patches increased by jump # to destroy locality of reference for ilo in range(lo[0], hi[0]-chunk-jump+1, chunk+jump):...
454,941
def test1D(): n = 1024*1024 buf = np.zeros(n/4, dtype=np.float64) chunk = np.asarray([1,9,16,81,256,576,900,2304,4096,8281, 16384,29241,65536,124609,193600,262144]) g_a = ga.create(ga.C_DBL, (n,), 'a') if 0 == g_a: ga.error('ga.create failed') buf[:] = 0.01 ga.zero(g_a) if 0 == me: print '' print '' print '' print (' P...
def test1D(): n = 1024*1024 buf = np.zeros(n/4, dtype=np.float64) chunk = np.asarray([1,9,16,81,256,576,900,2304,4096,8281, 16384,29241,65536,124609,193600,262144]) g_a = ga.create(ga.C_DBL, (n,), 'a') if 0 == g_a: ga.error('ga.create failed') buf[:] = 0.01 ga.zero(g_a) if 0 == me: print '' print '' print '' print (' P...
454,942
def time_get1(g_a, lo, hi, buf, chunk, jump, local): count = 0 rows = hi[0]-lo[0] shift = [3*rows, 2*rows, rows] seconds = time.time() # distance between consecutive patches increased by jump # to destroy locality of reference for ilo in range(lo[0], hi[0]-chunk-jump+1, chunk+jump): ihi = ilo+chunk count += 1 if local:...
def time_get1(g_a, lo, hi, buf, chunk, jump, local): count = 0 rows = hi[0]-lo[0] shift = [3*rows, 2*rows, rows] seconds = time.time() # distance between consecutive patches increased by jump # to destroy locality of reference for ilo in range(lo[0], hi[0]-chunk-jump+1, chunk+jump): ihi = ilo+chunk count += 1 if local:...
454,943
def time_put1(g_a, lo, hi, buf, chunk, jump, local): count = 0 rows = hi[0]-lo[0] shift = [rows, 2*rows, 3*rows] seconds = time.time() # distance between consecutive patches increased by jump # to destroy locality of reference for ilo in range(lo[0], hi[0]-chunk-jump+1, chunk+jump): ihi = ilo+chunk count += 1 if local:...
def time_put1(g_a, lo, hi, buf, chunk, jump, local): count = 0 rows = hi[0]-lo[0] shift = [rows, 2*rows, 3*rows] seconds = time.time() # distance between consecutive patches increased by jump # to destroy locality of reference for ilo in range(lo[0], hi[0]-chunk-jump+1, chunk+jump): ihi = ilo+chunk count += 1 if local:...
454,944
def create_local_a(gatype): """TODO""" nptype = ga.dtype(gatype) if gatype == ga.C_SCPL: if MIRROR: a = np.fromfunction(lambda i,j: i+inode, (n,n), dtype=np.float32) b = np.fromfunction(lambda i,j: j*n, (n,n), dtype=np.float32) return np.vectorize(complex)(a,b) else: a = np.fromfunction(lambda i,j: i, (n,n), dtyp...
def create_local_a(gatype): """TODO""" nptype = ga.dtype(gatype) if gatype == ga.C_SCPL: if MIRROR: a = np.fromfunction(lambda i,j: i+inode, (n,n), dtype=np.float32) b = np.fromfunction(lambda i,j: j*n, (n,n), dtype=np.float32) return np.vectorize(complex)(a,b) else: a = np.fromfunction(lambda i,j: i, (n,n), dtyp...
454,945
def check_int(): gatype = ga.C_INT check_zero(gatype) check_put_disjoint(gatype) check_get(gatype) check_accumulate_disjoint(gatype) check_accumulate_overlap(gatype) #check_add(gatype) check_dot(gatype) check_scale(gatype) check_copy(gatype) check_scatter_gather(gatype) """ ga.sync() if 0 == me and n > 7: print '' prin...
def check_int(): gatype = ga.C_INT check_zero(gatype) check_put_disjoint(gatype) check_get(gatype) check_accumulate_disjoint(gatype) check_accumulate_overlap(gatype) #check_add(gatype) check_copy(gatype) check_scatter_gather(gatype) """ ga.sync() if 0 == me and n > 7: print '' print '> Checking ga.print_patch --- sho...
454,946
def check_int(): gatype = ga.C_INT check_zero(gatype) check_put_disjoint(gatype) check_get(gatype) check_accumulate_disjoint(gatype) check_accumulate_overlap(gatype) #check_add(gatype) check_dot(gatype) check_scale(gatype) check_copy(gatype) check_scatter_gather(gatype) """ ga.sync() if 0 == me and n > 7: print '' prin...
def check_int(): gatype = ga.C_INT check_zero(gatype) check_put_disjoint(gatype) check_get(gatype) check_accumulate_disjoint(gatype) check_accumulate_overlap(gatype) #check_add(gatype) check_dot(gatype) check_scale(gatype) check_copy(gatype) check_scatter_gather(gatype) """ ga.sync() if 0 == me and n > 7: print '' prin...
454,947
def check_long(): pass
def check_long(): gatype = ga.C_LONG check_zero(gatype) check_put_disjoint(gatype) check_get(gatype) check_accumulate_disjoint(gatype) check_accumulate_overlap(gatype) check_copy(gatype) check_scatter_gather(gatype) check_print_patch(gatype) check_fence_and_lock(gatype)
454,948
def setup(argv=None, do_features=True, do_logging=True, do_welcome=None, log_to_console_only=None, warn_about_py_ext=True): """Carry out the various stages of the setup of Nsim. do_cmdline: the command line is parsed using the OptionParser object stored inside cmdline_parser variable. If it has not been set by the use...
def setup(argv=None, do_features=True, do_logging=True, do_welcome=None, log_to_console_only=None, warn_about_py_ext=True): """Carry out the various stages of the setup of Nsim. do_cmdline: the command line is parsed using the OptionParser object stored inside cmdline_parser variable. If it has not been set by the use...
454,949
def find_file(names, prefixes, suffixes, paths): for full_name in possible_names(names, prefixes, suffixes): full_path = find_path_of_file(full_name, paths) if full_path != None: return (full_name, full_path) return None
def find_file(names, prefixes, suffixes, paths): for full_name in possible_names(names, prefixes, suffixes): full_path = find_path_of_file(full_name, paths) if full_path != None: return (full_name, full_path) return None
454,950
def load_mesh(self, filename, region_names_and_mag_mats, unit_length, do_reorder=False,manual_distribution=None): """ :Parameters:
def load_mesh(self, filename, region_names_and_mag_mats, unit_length, do_reorder=False,manual_distribution=None): """ :Parameters:
454,951
def set_field_data_at_time(self, field_name, subfield_name, time, equality_tolerance=1e-19): f = self.open_handler() counters = self.get_counters_for_field(field_name, subfield_name) ids = counters['id'] times = counters['time'] rows = counters['row'] num_ids = len(ids) assert len(times) == num_ids, ("Inconsistency fou...
def set_field_data_at_time(self, field_name, subfield_name, time, equality_tolerance=1e-19): f = self.open_handler() counters = self.get_counters_for_field(field_name, subfield_name) ids = counters['id'] times = counters['time'] rows = counters['row'] num_ids = len(ids) assert len(times) == num_ids, ("Inconsistency fou...
454,952
def split_strings(ls): s = ls.lstrip() pieces = [] while len(s) > 0: second = s.find('"', 1) assert second > 0 and s[0] == '"' and s[second] == '"', \ ("split_strings expects a number of strings delimited by \" and " "separated by spaces, but it got: '%s'." % ls) pieces.append(s[1: second]) s = s[second + 1:].lstrip...
def split_strings(s, delim='"'): """Similar to s.split() but do not split whatherver is included between two delimiters.""" OUTSIDE, INSIDE, SPACE = range(3) state = SPACE n = len(s) i = 0 begin = 0 pieces = [] while len(s) > 0: second = s.find('"', 1) assert second > 0 and s[0] == '"' and s[second] == '"', \ ("split_...
454,953
def split_strings(ls): s = ls.lstrip() pieces = [] while len(s) > 0: second = s.find('"', 1) assert second > 0 and s[0] == '"' and s[second] == '"', \ ("split_strings expects a number of strings delimited by \" and " "separated by spaces, but it got: '%s'." % ls) pieces.append(s[1: second]) s = s[second + 1:].lstrip...
def split_strings(ls): s = ls.lstrip() pieces = [] while i < n: c = s[i] inc = 1 if state == SPACE: if not c.isspace(): begin = i state = OUTSIDE elif state == OUTSIDE: if c.isspace(): pieces.append(s[begin:i]) state = SPACE elif c == delim: state = INSIDE else: if c == delim: state = OUTSIDE i += inc if state != ...
454,954
def build_full_field_name(field_name, subfield_name): return '%s_%s' % (field_name, subfield_name)
def build_full_field_name(field_name, subfield_name): if subfield_name == None or len(subfield_name.strip()) == 0: return field_name else: return '%s_%s' % (field_name, subfield_name)
454,955
def set_fielddata_from_vector(field, subfieldname, data, scale_factor=1.0, normalise=False): # First check that shape of data and shape of this subfield agree: log.debug("set_fielddata_from_vector: setting %s to '%s'." % (_set_what_msg(subfieldname), data)) if True: data = _prepare_set_field(field, subfieldname, data,...
def set_fielddata_from_vector(field, subfieldname, data, scale_factor=1.0, normalise=False): # First check that shape of data and shape of this subfield agree: log.debug("set_fielddata_from_vector: setting %s to '%s'." % (_set_what_msg(subfieldname), data)) if True: data = _prepare_set_field(field, subfieldname, data,...
454,956
def E_relabeled(new_label): return map(lambda mn: ("E_" + mn, new_label + mn), material_names)
def E_relabeled(new_label): return map(lambda mn: ("E_" + mn, new_label + mn), material_names)
454,957
def get_field(self): root_node = self.content segment_node = root_node.a_segment h = segment_node.a_header ss = [h.a_xstepsize, h.a_ystepsize, h.a_zstepsize] dx, dy, dz = [0.5*ssi for ssi in ss]
def get_field(self): root_node = self.content segment_node = root_node.a_segment h = segment_node.a_header ss = [h.a_xstepsize, h.a_ystepsize, h.a_zstepsize] dx, dy, dz = [0.5*ssi for ssi in ss]
454,958
def get_field(self): root_node = self.content segment_node = root_node.a_segment h = segment_node.a_header ss = [h.a_xstepsize, h.a_ystepsize, h.a_zstepsize] dx, dy, dz = [0.5*ssi for ssi in ss]
def get_field(self): root_node = self.content segment_node = root_node.a_segment h = segment_node.a_header ss = [h.a_xstepsize, h.a_ystepsize, h.a_zstepsize] dx, dy, dz = [0.5*ssi for ssi in ss]
454,959
def p_parse_ddiffop(t): """parse_ddiffop : | contribs opt_amendment_specs opt_sum_specs""" #{ build_ddiffop $1 $3 $2 } pass
def p_parse_ddiffop(t): """parse_ddiffop : contribs opt_amendment_specs opt_sum_specs""" #{ build_ddiffop $1 $3 $2 } pass
454,960
def p_contribs(t): """contribs : | contrib | contribs SIGN contrib""" # { [$1] } # { let (c1, t2) = $3 in ($2*.c1, t2)::$1 } pass
def p_contribs(t): """contribs : contrib | contribs SIGN contrib""" # { [$1] } # { let (c1, t2) = $3 in ($2*.c1, t2)::$1 } pass
454,961
def p_amdmt_mxdim(t): """amdmt_mxdim : | MXDIM EQUALS LPAREN opt_fields VBAR VBAR opt_fields RPAREN""" #{ AMDMT_MXDIM ($4,$7) } pass
def p_amdmt_mxdim(t): """amdmt_mxdim : MXDIM EQUALS LPAREN opt_fields VBAR VBAR opt_fields RPAREN""" #{ AMDMT_MXDIM ($4,$7) } pass
454,962
def p_amdmt_diagonal_ones(t): """amdmt_diagonal_ones : | field EQUALS field""" #{ AMDMT_DIAGONAL_ONES ($1,$3) } pass
def p_amdmt_diagonal_ones(t): """amdmt_diagonal_ones : field EQUALS field""" #{ AMDMT_DIAGONAL_ONES ($1,$3) } pass
454,963
def p_amdmt_gauge_fix(t): """amdmt_gauge_fix : | GAUGEFIX field""" # { AMDMT_GAUGE_FIX $2 } pass
def p_amdmt_gauge_fix(t): """amdmt_gauge_fix : GAUGEFIX field""" # { AMDMT_GAUGE_FIX $2 } pass
454,964
def p_amdmt_periodic(t): """amdmt_periodic : | PERIODIC field""" #{ AMDMT_PERIODIC $2 } pass
def p_amdmt_periodic(t): """amdmt_periodic : PERIODIC field""" #{ AMDMT_PERIODIC $2 } pass
454,965
def p_fields(t): """fields : | field | field COMMA fields""" #{ [$1] } #{ $1::$3 } pass
def p_fields(t): """fields : field | field COMMA fields""" #{ [$1] } #{ $1::$3 } pass
454,966
def p_region_logic_atomic(t): """region_logic_atomic : | LPAREN region_logic RPAREN | INT | STRING | DOF_REGION_ALL EQUALS INT | DOF_REGION_SOME EQUALS INT | DOF_REGION_ALL EQUALS STRING | DOF_REGION_SOME EQUALS STRING | HASH EQUALS INT """ # {$2} # {DLOG_some (string_of_int $1)} # {DLOG_some $1} # {DLOG_all (string_of...
def p_region_logic_atomic(t): """region_logic_atomic : LPAREN region_logic RPAREN | INT | STRING | DOF_REGION_ALL EQUALS INT | DOF_REGION_SOME EQUALS INT | DOF_REGION_ALL EQUALS STRING | DOF_REGION_SOME EQUALS STRING | HASH EQUALS INT """ # {$2} # {DLOG_some (string_of_int $1)} # {DLOG_some $1} # {DLOG_all (string_of_i...
454,967
def p_region_logic_opt_not(t): """region_logic_opt_not : | DOF_REGION_NOT region_logic_atomic | region_logic_atomic """ # {DLOG_not $2} # {$1} pass
def p_region_logic_opt_not(t): """region_logic_opt_not : DOF_REGION_NOT region_logic_atomic | region_logic_atomic """ # {DLOG_not $2} # {$1} pass
454,968
def p_region_logic_and(t): """region_logic_and : | region_logic_opt_not DOF_REGION_AND region_logic_and | region_logic_opt_not """ # {DLOG_and [$1;$3]} # {$1} pass
def p_region_logic_and(t): """region_logic_and : region_logic_opt_not DOF_REGION_AND region_logic_and | region_logic_opt_not """ # {DLOG_and [$1;$3]} # {$1} pass
454,969
def p_region_logic_or(t): """region_logic_or : | region_logic_and DOF_REGION_OR region_logic_or | region_logic_and""" # {DLOG_or [$1;$3]} # {$1} pass
def p_region_logic_or(t): """region_logic_or : region_logic_and DOF_REGION_OR region_logic_or | region_logic_and""" # {DLOG_or [$1;$3]} # {$1} pass
454,970
def is_compatible_with(self, physical_quantity): """ Returns True when the given physical quantity is compatible with the object itself.
def is_compatible_with(self, physical_quantity): """ Returns True when the given physical quantity is compatible with the object itself.
454,971
def is_compatible_with(self, physical_quantity): """ Returns True when the given physical quantity is compatible with the object itself.
def is_compatible_with(self, physical_quantity): """ Returns True when the given physical quantity is compatible with the object itself.
454,972
def get_version_string(): return svnversion.svnversion
def get_version_string(): try: import svnversion return svnversion.svnversion except: return "(unknown)"
454,973
def get_nmag_release_dist_svn_string(): msg = "Versions:" msg += "\n\tnsim.svnversion =" + str(nsim.svnversion.svnversion) msg += "\n\tnmag-release =" + str(get_nmag_release()) msg += "\n\tnmag-distribution-mode =" + str(get_nmag_distmode()) msg += "\n\tnmag-release-date =" + str(get_nmag_release...
def get_nmag_release_dist_svn_string(): msg = "Versions:" msg += "\n\tnsim.version =" + str(v) msg += "\n\tnmag-release =" + str(get_nmag_release()) msg += "\n\tnmag-distribution-mode =" + str(get_nmag_distmode()) msg += "\n\tnmag-release-date =" + str(get_nmag_release_date()) return msg
454,974
def get_nmag_release_dist_svn_string(): msg = "Versions:" msg += "\n\tnsim.svnversion =" + str(nsim.svnversion.svnversion) msg += "\n\tnmag-release =" + str(get_nmag_release()) msg += "\n\tnmag-distribution-mode =" + str(get_nmag_distmode()) msg += "\n\tnmag-release-date =" + str(get_nmag_release...
def get_nmag_release_dist_svn_string(): msg = "Versions:" msg += "\n\tnsim.svnversion =" + str(nsim.svnversion.svnversion) msg += "\n\tnmag-release =" + str(get_nmag_release()) msg += "\n\tnmag-distribution-mode =" + str(get_nmag_distmode()) msg += "\n\tnmag-release-date =" + str(get_nmag_release_...
454,975
def set_from_file(self, filehandle, field_name, subfield_name): """Read the field info from the given hdf5 file handle or file name. """ full_name = build_full_field_name(field_name, subfield_name)
def set_from_file(self, filehandle, field_name, subfield_name): """Read the field info from the given hdf5 file handle or file name. """ full_name = build_full_field_name(field_name, subfield_name)
454,976
def find_file(names, prefixes, suffixes, paths): for full_name in possible_names(names, prefixes, suffixes): full_path = find_path_of_file(full_name, paths) if full_path != None: return (full_name, full_path) return None
def find_file(names, prefixes, suffixes, paths): for full_name in possible_names(names, prefixes, suffixes): full_path = find_path_of_file(full_name, paths) if full_path != None: return (full_name, full_path) return None
454,977
def find_file(names, prefixes, suffixes, paths): for full_name in possible_names(names, prefixes, suffixes): full_path = find_path_of_file(full_name, paths) if full_path != None: return (full_name, full_path) return None
def find_file(names, prefixes, suffixes, paths): for full_name in possible_names(names, prefixes, suffixes): full_path = find_path_of_file(full_name, paths) if full_path != None: return (full_name, full_path) return None
454,978
def find_file(names, prefixes, suffixes, paths): for full_name in possible_names(names, prefixes, suffixes): full_path = find_path_of_file(full_name, paths) if full_path != None: return (full_name, full_path) return None
def find_file(names, prefixes, suffixes, paths): for full_name in possible_names(names, prefixes, suffixes): full_path = find_path_of_file(full_name, paths] if full_path != None: return (full_name, full_path] return None
454,979
def dump_fields(self, fields=None, filename=None, inspect=None, format="binary"): """Dump the given field to a vtk file and launch Mayavi for visualisation, if required (useful for interactive work).""" if filename == None: filename = "%s-dump.vtk" % self.name
def dump_fields(self, fields=None, filename=None, inspect=None, format="binary"): """Dump the given field to a vtk file and launch Mayavi for visualisation, if required (useful for interactive work).""" if filename == None: filename = "%s-dump.vtk" % self.name
454,980
def dump_fields(self, fields=None, filename=None, inspect=None, format="binary"): """Dump the given field to a vtk file and launch Mayavi for visualisation, if required (useful for interactive work).""" if filename == None: filename = "%s-dump.vtk" % self.name
def dump_fields(self, fields=None, filename=None, inspect=None, format="binary"): """Dump the given field to a vtk file and launch Mayavi for visualisation, if required (useful for interactive work).""" if filename == None: filename = "%s-dump.vtk" % self.name
454,981
def dump_fields(self, fields=None, filename=None, inspect=None, format="binary"): """Dump the given field to a vtk file and launch Mayavi for visualisation, if required (useful for interactive work).""" if filename == None: filename = "%s-dump.vtk" % self.name
def dump_fields(self, fields=None, filename=None, inspect=None, format="binary"): """Dump the given field to a vtk file and launch Mayavi for visualisation, if required (useful for interactive work).""" if filename == None: filename = "%s-dump.vtk" % self.name
454,982
def mapcols(mapid): # "i" and "o" are omitted from barrington atlas columns in maps 100-102 if int(mapid) >= 100: return 'abcdefghjklmnpqrstuvwxyz' else: return 'abcdefghijklmnopqrstuvwxyz'
def mapcols(mapid): # "i" and "o" are omitted from barrington atlas columns in maps 100-102 if int(mapid) in (100, 101): return 'abcdefghjklmnpqrstuvwxyz' else: return 'abcdefghijklmnopqrstuvwxyz'
454,983
def getTemplate(self, container): site = container.portal_url.getPortalObject() parent = container container_base = Acquisition.aq_base(container) while parent is not None: template = component.queryMultiAdapter( (parent, self), interfaces.ITemplate) parent_base = Acquisition.aq_base(parent) if template is not None and...
def getTemplate(self, container): site = getToolByName(container, 'portal_url').getPortalObject() parent = container container_base = Acquisition.aq_base(container) while parent is not None: template = component.queryMultiAdapter( (parent, self), interfaces.ITemplate) parent_base = Acquisition.aq_base(parent) if templa...
454,984
def locateInArray(list1, list2): x = 0 y = 0 for x in xrange(len(list1)): if list1[x] == list2[0]: counter = 0 for y in xrange(len(list2)): if list1[x+y] != list2[y]: break else: counter += 1 if counter == len(list2): return x return -1
def locateInArray(list1, list2): x = 0 y = 0 for x in xrange(len(list1)): if list1[x] == list2[0]: counter = 0 for y in xrange(len(list2)): try: if list1[x+y] != list2[y]: break else: counter += 1 except IndexError: return -1 if counter == len(list2): return x return -1
454,985
def configure(self, options, config): super(NoseGAE, self).configure(options, config) if not self.enabled: return self.config = config if options.gae_app is not None: self._path = options.gae_app else: self._path = config.workingDir if options.gae_lib_root is not None: root = self._gae_path = options.gae_lib_root for d...
def configure(self, options, config): super(NoseGAE, self).configure(options, config) if not self.enabled: return self.config = config if options.gae_app is not None: self._path = options.gae_app else: self._path = config.workingDir if options.gae_lib_root is not None: root = self._gae_path = options.gae_lib_root sys.p...
454,986
def configure(self, options, config): super(NoseGAE, self).configure(options, config) if not self.enabled: return self.config = config if options.gae_app is not None: self._path = options.gae_app else: self._path = config.workingDir if options.gae_lib_root is not None: root = self._gae_path = options.gae_lib_root for d...
def configure(self, options, config): super(NoseGAE, self).configure(options, config) if not self.enabled: return self.config = config if options.gae_app is not None: self._path = options.gae_app else: self._path = config.workingDir if options.gae_lib_root is not None: root = self._gae_path = options.gae_lib_root for d...
454,987
def update(self, name, score, font): player = [] i = 1 try: self.cur.execute('INSERT INTO highscore VALUES (null, ?, ?)', (name, score))
def update(self, name, score, font): player = [] i = 1 try: self.cur.execute('INSERT INTO highscore VALUES (null, ?, ?)', (name, score))
454,988
def main(): pygame.init() try: w = 640 h = 480 screen = pygame.display.set_mode((w, h)) font = pygame.font.SysFont('Arial Black', 20) pygame.mouse.set_visible(False) clock = pygame.time.Clock() ch = CollisionHandler() TIMEEVENT = USEREVENT + 1 pygame.time.set_timer(TIMEEVENT, 15) # Load our balls balls = [ Ball(scre...
def main(): pygame.init() try: w = 640 h = 480 screen = pygame.display.set_mode((w, h)) font = pygame.font.SysFont('Arial Black', 20) pygame.mouse.set_visible(False) clock = pygame.time.Clock() ch = CollisionHandler() TIMEEVENT = USEREVENT + 1 pygame.time.set_timer(TIMEEVENT, 15) # Load our balls balls = [ Ball(scre...
454,989
def main(): pygame.init() try: w = 640 h = 480 screen = pygame.display.set_mode((w, h)) font = pygame.font.SysFont('Arial Black', 20) pygame.mouse.set_visible(False) clock = pygame.time.Clock() ch = CollisionHandler() TIMEEVENT = USEREVENT + 1 pygame.time.set_timer(TIMEEVENT, 15) # Load our balls balls = [ Ball(scre...
def main(): pygame.init() try: w = 640 h = 480 screen = pygame.display.set_mode((w, h)) font = pygame.font.SysFont('Arial Black', 20) pygame.mouse.set_visible(False) clock = pygame.time.Clock() ch = CollisionHandler() TIMEEVENT = USEREVENT + 1 pygame.time.set_timer(TIMEEVENT, 15) # Load our balls balls = [ Ball(scre...
454,990
def main(): pygame.init() try: w = 640 h = 480 screen = pygame.display.set_mode((w, h)) font = pygame.font.SysFont('Arial Black', 20) pygame.mouse.set_visible(False) clock = pygame.time.Clock() ch = CollisionHandler() TIMEEVENT = USEREVENT + 1 pygame.time.set_timer(TIMEEVENT, 15) # Load our balls balls = [ Ball(scre...
def main(): pygame.init() try: w = 640 h = 480 screen = pygame.display.set_mode((w, h)) font = pygame.font.SysFont('Arial Black', 20) pygame.mouse.set_visible(False) clock = pygame.time.Clock() ch = CollisionHandler() TIMEEVENT = USEREVENT + 1 pygame.time.set_timer(TIMEEVENT, 15) # Load our balls balls = [ Ball(scre...
454,991
def process_request(self, request): # don't process AJAX requests if request.is_ajax(): return
def process_request(self, request): # don't process AJAX requests if request.is_ajax(): return
454,992
def process_request(self, request): # don't process AJAX requests if request.is_ajax(): return
def process_request(self, request): # don't process AJAX requests if request.is_ajax(): return
454,993
def cvecs( self ): """ Return centering vectors for this space group. """ typ = self.mydata['symb'][0] ##TODO: find vectors for B and test for A and C and R ##TODO: http://img.chem.ucl.ac.uk/sgp/large/146az1.htm vs = { 'A':[ Vec( 0, 0.5, 0.5 ) ], 'C':[ Vec( 0.5, 0.5, 0 ) ], 'B':[], ##TODO: <<< error 'F':[ Vec( 0, 0.5, ...
def cvecs( self ): """ Return centering vectors for this space group. """ typ = self.mydata['symb'][0] ##TODO: find vectors for B and test for A and C and R ##TODO: http://img.chem.ucl.ac.uk/sgp/large/146az1.htm vs = { 'A':[ Vec( 0, 0.5, 0.5 ) ], 'C':[ Vec( 0.5, 0.5, 0 ) ], 'B':[], ##TODO: <<< error 'F':[ Vec( 0, 0.5, ...
454,994
def cvecs( self ): """ Return centering vectors for this space group. """ typ = self.mydata['symb'][0] ##TODO: find vectors for B and test for A and C and R ##TODO: http://img.chem.ucl.ac.uk/sgp/large/146az1.htm vs = { 'A':[ Vec( 0, 0.5, 0.5 ) ], 'C':[ Vec( 0.5, 0.5, 0 ) ], 'B':[], ##TODO: <<< error 'F':[ Vec( 0, 0.5, ...
def cvecs( self ): """ Return centering vectors for this space group. """ typ = self.mydata['symb'][0] ##TODO: find vectors for B and test for A and C and R ##TODO: http://img.chem.ucl.ac.uk/sgp/large/146az1.htm vs = { 'A':[ Vec( 0, 0.5, 0.5 ) ], 'C':[ Vec( 0.5, 0.5, 0 ) ], 'B':[], ##TODO: <<< error 'F':[ Vec( 0, 0.5, ...
454,995
def to_sort( self ): cond = ( ("K1" , (1, 1, 1, 1, 1, 1)), ("K3" , (1, 0, 1, 1, 0, 1)), ("K5" , (0, 0, 0, 1, 1, 1)), ("H4" , (0, 1, 0, 1, 2, 1)), ("Q1" , (1, 2, 1, 1, 2, 1)), ("Q2" , (1, 0, 1, 1, 2, 1)), ("Q5" , (0, 0, 0, 1, 2, 1)), ("R1" , (1, 1, 1, 2, 2, 2)), ("R3" , (1, 0, 1, 1, 0, 2)), ("O11" , (...
def to_sort( self ): cond = ( ("K1" , (1, 1, 1, 1, 1, 1)), ("K3" , (1, 0, 1, 1, 0, 1)), ("K5" , (0, 0, 0, 1, 1, 1)), ("H4" , (0, 1, 0, 1, 2, 1)), ("Q1" , (1, 2, 1, 1, 2, 1)), ("Q2" , (1, 0, 1, 1, 2, 1)), ("Q5" , (0, 0, 0, 1, 2, 1)), ("R1" , (1, 1, 1, 2, 2, 2)), ("R3" , (1, 0, 1, 1, 0, 2)), ("O11" , (...
454,996
def testMakeDS(self): ds = dns.dnssec.make_ds(abs_dnspython_org, sep_key, 'SHA256') print ds self.failUnless(ds == good_ds)
def testMakeDS(self): ds = dns.dnssec.make_ds(abs_dnspython_org, sep_key, 'SHA256') self.failUnless(ds == good_ds)
454,997
def from_text(cls, rdclass, rdtype, tok, origin = None, relativize = True): if tok.get_string() != r'\#': raise dns.exception.SyntaxError, \ r'generic rdata does not start with \#' length = tok.get_int() chunks = [] while 1: token = tok.get() if token.is_eol_or_eof(): break chunks.append(token.value) hex = ''.join(chun...
def from_text(cls, rdclass, rdtype, tok, origin = None, relativize = True): if tok.get_string() != r'\#': raise dns.exception.SyntaxError, \ r'generic rdata does not start with \#' length = tok.get_int() chunks = [] while 1: token = tok.get() if token.is_eol_or_eof(): break chunks.append(token.value) hex = ''.join(chun...
454,998
def from_text(rdclass, rdtype, tok, origin = None, relativize = True): """Build an rdata object from text format. This function attempts to dynamically load a class which implements the specified rdata class and type. If there is no class-and-type-specific implementation, the GenericRdata class is used. Once a class...
def from_text(rdclass, rdtype, tok, origin = None, relativize = True): """Build an rdata object from text format. This function attempts to dynamically load a class which implements the specified rdata class and type. If there is no class-and-type-specific implementation, the GenericRdata class is used. Once a class...
454,999