bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def __init__(self): self.ns_global_prefix = "/script_server" self.move_action_server = actionlib.SimpleActionServer(self.ns_global_prefix, MoveAction, self.execute_cb) time.sleep(1) | def __init__(self): self.ns_global_prefix = "/script_server" self.move_action_server = actionlib.SimpleActionServer(self.ns_global_prefix, MoveAction, self.execute_cb) time.sleep(1) | 454,800 |
def execute_cb(self, server_goal): server_result = MoveActionResult().result server_result.return_value = self.sss.move(server_goal.component_name.data,server_goal.parameter_name.data) if server_result.return_value == 0: print "success" self.move_action_server.set_succeeded(server_result) else: print "error" self.move... | def execute_cb(self, server_goal): server_result = MoveActionResult().result handle01 = self.sss.move(server_goal.component_name,server_goal.parameter_name) if server_result.return_value == 0: print "success" self.move_action_server.set_succeeded(server_result) else: print "error" self.move_action_server.set_aborted(s... | 454,801 |
def execute_cb(self, server_goal): server_result = MoveActionResult().result server_result.return_value = self.sss.move(server_goal.component_name.data,server_goal.parameter_name.data) if server_result.return_value == 0: print "success" self.move_action_server.set_succeeded(server_result) else: print "error" self.move... | def execute_cb(self, server_goal): server_result = MoveActionResult().result server_result.return_value = self.sss.move(server_goal.component_name.data,server_goal.parameter_name.data) if server_result.return_value == 0: rospy.logdebug("action result success") self.move_action_server.set_succeeded(server_result) else:... | 454,802 |
def execute_cb(self, server_goal): server_result = MoveActionResult().result server_result.return_value = self.sss.move(server_goal.component_name.data,server_goal.parameter_name.data) if server_result.return_value == 0: print "success" self.move_action_server.set_succeeded(server_result) else: print "error" self.move... | def execute_cb(self, server_goal): server_result = MoveActionResult().result server_result.return_value = self.sss.move(server_goal.component_name.data,server_goal.parameter_name.data) if server_result.return_value == 0: print "success" self.move_action_server.set_succeeded(server_result) else: rospy.logerror("action ... | 454,803 |
def execute_cb(self, server_goal): server_result = MoveActionResult().result server_result.return_value = self.sss.move(server_goal.component_name.data,server_goal.parameter_name.data) if server_result.return_value == 0: print "success" self.move_action_server.set_succeeded(server_result) else: print "error" self.move... | def execute_cb(self, server_goal): server_result = MoveActionResult().result server_result.return_value = self.sss.move(server_goal.component_name.data,server_goal.parameter_name.data) if server_result.return_value == 0: print "success" self.move_action_server.set_succeeded(server_result) else: print "error" self.move... | 454,804 |
def Run(self): listener = tf.TransformListener(True, rospy.Duration(10.0)) # prepare for grasping self.sss.move("base","kitchen") handle01 = self.sss.move("arm","pregrasp",False) self.sss.move("sdh","cylopen") handle01.wait() | def Run(self): listener = tf.TransformListener(True, rospy.Duration(10.0)) # prepare for grasping self.sss.move("base","kitchen") handle01 = self.sss.move("arm","pregrasp",False) self.sss.move("sdh","cylopen") handle01.wait() | 454,805 |
def setEMStop(self, em): if(em): #print "Emergency Stop Active" self.status_image.set_from_file(roslib.packages.get_pkg_dir("cob_dashboard") + "/share/icons/weather-storm.png") self.status_label.set_text("EM Stop !") n = pynotify.Notification("Emergency Stop issued!", "", "dialog-warning") icon=gtk.status_icon_new_from... | def setEMStop(self, em): if(em): #print "Emergency Stop Active" self.status_image.set_from_file(roslib.packages.get_pkg_dir("cob_dashboard") + "/share/icons/weather-storm.png") self.status_label.set_text("EM Stop !") if(self.em_stop == False): self.em_stop = True n = pynotify.Notification("Emergency Stop issued!", "", ... | 454,806 |
def setEMStop(self, em): if(em): #print "Emergency Stop Active" self.status_image.set_from_file(roslib.packages.get_pkg_dir("cob_dashboard") + "/share/icons/weather-storm.png") self.status_label.set_text("EM Stop !") n = pynotify.Notification("Emergency Stop issued!", "", "dialog-warning") icon=gtk.status_icon_new_from... | def setEMStop(self, em): if(em): #print "Emergency Stop Active" self.status_image.set_from_file(roslib.packages.get_pkg_dir("cob_dashboard") + "/share/icons/weather-storm.png") self.status_label.set_text("EM Stop !") n = pynotify.Notification("Emergency Stop issued!", "", "dialog-warning") icon=gtk.status_icon_new_from... | 454,807 |
def SetOperationMode(self,component_name,mode): rospy.loginfo("setting <<%s>> to operation mode <<%s>>",component_name, mode) rospy.set_param(component_name + "_controller/OperationMode",mode) | def SetOperationMode(self,component_name,mode,blocking=False): rospy.loginfo("setting <<%s>> to operation mode <<%s>>",component_name, mode) rospy.set_param(component_name + "_controller/OperationMode",mode) | 454,808 |
def SetOperationMode(self,component_name,mode): rospy.loginfo("setting <<%s>> to operation mode <<%s>>",component_name, mode) rospy.set_param(component_name + "_controller/OperationMode",mode) | def SetOperationMode(self,component_name,mode): rospy.loginfo("setting <<%s>> to operation mode <<%s>>",component_name, mode) rospy.set_param("/" + component_name + "_controller/OperationMode",mode) | 454,809 |
def do_expose_event(self, event): # Create the cairo context cr = self.window.cairo_create() print "Width: ", self.allocation.width print "Height: ", self.allocation.height # Restrict Cairo to the exposed area; avoid extra work cr.rectangle(event.area.x, event.area.y, event.area.width, event.area.height) cr.clip() self... | def do_expose_event(self, event): # Create the cairo context cr = self.window.cairo_create() # Restrict Cairo to the exposed area; avoid extra work cr.rectangle(event.area.x, event.area.y, event.area.width, event.area.height) cr.clip() self.draw(cr, self.allocation.width,self.allocation.height ) | 454,810 |
def draw(self, cr, width, height): # Fill the background with gray color = 0.5 xw = height/(self.sizex+1) print height, ", ", self.sizex yw = width/(self.sizey+1) print "Divider: ", xw, ", ", yw for i in range(0,self.sizey): for j in range(0,self.sizex): if(color==0.0): color=1.0 else: color=0.0 cr.set_source_rgb(color... | def draw(self, cr, width, height): # Fill the background with gray color = 0.5 xw = width/(self.sizex) yw = height/(self.sizey) for i in range(0,self.sizex): for j in range(0,self.sizey): if(color==0.0): color=1.0 else: color=0.0 cr.set_source_rgb(color, 1-color, 0.5) print (j)*yw,":", (i)*xw,":", (j+1)*yw,":", (i+1) *... | 454,811 |
def draw(self, cr, width, height): # Fill the background with gray color = 0.5 xw = height/(self.sizex+1) print height, ", ", self.sizex yw = width/(self.sizey+1) print "Divider: ", xw, ", ", yw for i in range(0,self.sizey): for j in range(0,self.sizex): if(color==0.0): color=1.0 else: color=0.0 cr.set_source_rgb(color... | def draw(self, cr, width, height): # Fill the background with gray color = 0.5 xw = height/(self.sizex+1) print height, ", ", self.sizex yw = width/(self.sizey+1) print "Divider: ", xw, ", ", yw for i in range(0,self.sizey): for j in range(0,self.sizex): if(color==0.0): color=1.0 else: color=0.0 cr.set_source_rgb(color... | 454,812 |
def main_quit(obh, obb): global dget #Stopping the thread and the gtk's main loop dget.stop() gtk.main_quit() | def main_quit(obh, obb): global dget #Stopping the thread and the gtk's main loop dget.stop() gtk.main_quit() | 454,813 |
def main_quit(obh, obb): global dget #Stopping the thread and the gtk's main loop dget.stop() gtk.main_quit() | def main_quit(obh, obb): global dget #Stopping the thread and the gtk's main loop dget.stop() gtk.main_quit() | 454,814 |
def AppendGraph(self, function_name, component_name, parameter_name, blocking=True): global graph global graph_wait_list graph.add_edge(self.last_node, str(self.function_counter)+"_"+function_name+"_"+component_name+"_"+parameter_name) for waiter in graph_wait_list: graph.add_edge(waiter, str(self.function_counter)+"... | def AppendGraph(self, function_name, component_name, parameter_name, blocking=True): global graph global graph_wait_list if type(parameter_name) is types.StringType: graphstring = str(self.function_counter)+"_"+function_name+"_"+component_name+"_"+parameter_name else: graphstring = str(self.function_counter)+"_"+functi... | 454,815 |
def AppendGraph(self, function_name, component_name, parameter_name, blocking=True): global graph global graph_wait_list graph.add_edge(self.last_node, str(self.function_counter)+"_"+function_name+"_"+component_name+"_"+parameter_name) for waiter in graph_wait_list: graph.add_edge(waiter, str(self.function_counter)+"... | def AppendGraph(self, function_name, component_name, parameter_name, blocking=True): global graph global graph_wait_list graph.add_edge(self.last_node, str(self.function_counter)+"_"+function_name+"_"+component_name+"_"+parameter_name) for waiter in graph_wait_list: graph.add_edge(waiter, graphstring) graph_wait_list... | 454,816 |
def AppendGraph(self, function_name, component_name, parameter_name, blocking=True): global graph global graph_wait_list graph.add_edge(self.last_node, str(self.function_counter)+"_"+function_name+"_"+component_name+"_"+parameter_name) for waiter in graph_wait_list: graph.add_edge(waiter, str(self.function_counter)+"... | def AppendGraph(self, function_name, component_name, parameter_name, blocking=True): global graph global graph_wait_list graph.add_edge(self.last_node, str(self.function_counter)+"_"+function_name+"_"+component_name+"_"+parameter_name) for waiter in graph_wait_list: graph.add_edge(waiter, str(self.function_counter)+"... | 454,817 |
def __init__(self, function_name, component_name, parameter_name, blocking, simulate): global graph global function_counter self.parent_node = "" self.error_code = -1 self.wait_log = False self.function_counter = function_counter self.function_name = function_name self.component_name = component_name self.parameter_nam... | def __init__(self, function_name, component_name, parameter_name, blocking, simulate): global graph global function_counter self.parent_node = "" self.error_code = -1 self.wait_log = False self.function_counter = function_counter self.function_name = function_name self.component_name = component_name self.parameter_nam... | 454,818 |
def set_client(self,client): self.client = client | def set_client(self,client): self.client = client | 454,819 |
def move_traj(self,component_name,parameter_name,blocking): ah = action_handle("move", component_name, parameter_name, blocking, self.parse) if(self.parse): return ah else: ah.set_active() rospy.loginfo("Move <<%s>> to <<%s>>",component_name,parameter_name) # selecting component if component_name == "tray": joint_nam... | def move_traj(self,component_name,parameter_name,blocking): ah = action_handle("move", component_name, parameter_name, blocking, self.parse) if(self.parse): return ah else: ah.set_active() rospy.loginfo("Move <<%s>> to <<%s>>",component_name,parameter_name) # selecting component if component_name == "tray": joint_nam... | 454,820 |
def move_traj(self,component_name,parameter_name,blocking): ah = action_handle("move", component_name, parameter_name, blocking, self.parse) if(self.parse): return ah else: ah.set_active() rospy.loginfo("Move <<%s>> to <<%s>>",component_name,parameter_name) # selecting component if component_name == "tray": joint_nam... | def self.set_operation_mode(component_name,"position") move_traj(self,component_name,parameter_name,blocking): self.set_operation_mode(component_name,"position") ah self.set_operation_mode(component_name,"position") = self.set_operation_mode(component_name,"position") action_handle("move", self.set_operation_m... | 454,821 |
def set_light(self,parameter_name): ah = action_handle() ah.component_name = "light" ah.parameter_name = parameter_name rospy.loginfo("Set light to %s",parameter_name) pub = rospy.Publisher('light_controller/command', Light) rospy.sleep(0.5) # we have to wait here until publisher is ready, don't ask why # get joint v... | def set_light(self,parameter_name): ah = action_handle() ah.component_name = "light" ah.parameter_name = parameter_name rospy.loginfo("Set light to %s",parameter_name) # we have to wait here until publisher is ready, don't ask why # get joint values from parameter server if type(parameter_name) is str: if not rospy.h... | 454,822 |
def set_light(self,parameter_name): ah = action_handle() ah.component_name = "light" ah.parameter_name = parameter_name rospy.loginfo("Set light to %s",parameter_name) pub = rospy.Publisher('light_controller/command', Light) rospy.sleep(0.5) # we have to wait here until publisher is ready, don't ask why # get joint v... | def set_light(self,parameter_name): ah = action_handle() ah.component_name = "light" ah.parameter_name = parameter_name rospy.loginfo("Set light to %s",parameter_name) pub = rospy.Publisher('light_controller/command', Light) rospy.sleep(0.5) # we have to wait here until publisher is ready, don't ask why # get joint v... | 454,823 |
def __init__(self, parse=False): global graph self.ns_global_prefix = "/script_server" #self.ns_global_prefix = "" self.parse = parse # sound self.soundhandle = SoundClient() # light self.pub_light = rospy.Publisher('light_controller/command', Light) rospy.sleep(0.5) # we have to wait here until publisher is ready, d... | def__init__(self,parse=False):globalgraphself.ns_global_prefix="/script_server"#self.ns_global_prefix=""self.parse=parse#soundself.soundhandle=SoundClient()#lightself.pub_light=rospy.Publisher('light_controller/command',Light)rospy.sleep(0.5)#wehavetowaithereuntilpublisherisready,don'taskwhy | 454,824 |
def set_operation_mode(self,component_name,mode,blocking=False): rospy.loginfo("setting <<%s>> to operation mode <<%s>>",component_name, mode) rospy.set_param("/" + component_name + "_controller/OperationMode",mode) # \todo remove and only use service call #rospy.wait_for_service("/" + component_name + "_controller/set... | def set_operation_mode(self,component_name,mode,blocking=False): rospy.set_param("/" + component_name + "_controller/OperationMode",mode) # \todo remove and only use service call #rospy.wait_for_service("/" + component_name + "_controller/set_operation_mode") try: set_operation_mode = rospy.ServiceProxy("/" + componen... | 454,825 |
def set_operation_mode(self,component_name,mode,blocking=False): rospy.loginfo("setting <<%s>> to operation mode <<%s>>",component_name, mode) rospy.set_param("/" + component_name + "_controller/OperationMode",mode) # \todo remove and only use service call #rospy.wait_for_service("/" + component_name + "_controller/set... | def set_operation_mode(self,component_name,mode,blocking=False): rospy.loginfo("setting <<%s>> to operation mode <<%s>>",component_name, mode) rospy.set_param("/" + component_name + "_controller/OperationMode",mode) # \todo remove and only use service call #rospy.wait_for_service("/" + component_name + "_controller/set... | 454,826 |
def Speak(self,parameter_name,mode="DEFAULT") """ Speak sound specified by 'parameter_name' either via TTS or by playing a WAV-File Possible modes are: DEFAULT - use mode set by a global parameter (default) WAV_DE - play wav-Files with German Text WAV_EN - play wav-FIles with English Text FEST_EN - use Text-to-speech w... | def Speak(self,parameter_name,mode="DEFAULT"): """ Speak sound specified by 'parameter_name' either via TTS or by playing a WAV-File Possible modes are: DEFAULT - use mode set by a global parameter (default) WAV_DE - play wav-Files with German Text WAV_EN - play wav-FIles with English Text FEST_EN - use Text-to-speech ... | 454,827 |
def Speak(self,parameter_name,mode="DEFAULT") """ Speak sound specified by 'parameter_name' either via TTS or by playing a WAV-File Possible modes are: DEFAULT - use mode set by a global parameter (default) WAV_DE - play wav-Files with German Text WAV_EN - play wav-FIles with English Text FEST_EN - use Text-to-speech w... | def Speak(self,parameter_name,mode="DEFAULT") """ Speak sound specified by 'parameter_name' either via TTS or by playing a WAV-File Possible modes are: DEFAULT - use mode set by a global parameter (default) WAV_DE - play wav-Files with German Text WAV_EN - play wav-FIles with English Text FEST_EN - use Text-to-speech w... | 454,828 |
def Speak(self,parameter_name,mode="DEFAULT") """ Speak sound specified by 'parameter_name' either via TTS or by playing a WAV-File Possible modes are: DEFAULT - use mode set by a global parameter (default) WAV_DE - play wav-Files with German Text WAV_EN - play wav-FIles with English Text FEST_EN - use Text-to-speech w... | def Speak(self,parameter_name,mode="DEFAULT") """ Speak sound specified by 'parameter_name' either via TTS or by playing a WAV-File Possible modes are: DEFAULT - use mode set by a global parameter (default) WAV_DE - play wav-Files with German Text WAV_EN - play wav-FIles with English Text FEST_EN - use Text-to-speech w... | 454,829 |
def Speak(self,parameter_name,mode="DEFAULT") """ Speak sound specified by 'parameter_name' either via TTS or by playing a WAV-File Possible modes are: DEFAULT - use mode set by a global parameter (default) WAV_DE - play wav-Files with German Text WAV_EN - play wav-FIles with English Text FEST_EN - use Text-to-speech w... | def Speak(self,parameter_name,mode="DEFAULT") """ Speak sound specified by 'parameter_name' either via TTS or by playing a WAV-File Possible modes are: DEFAULT - use mode set by a global parameter (default) WAV_DE - play wav-Files with German Text WAV_EN - play wav-FIles with English Text FEST_EN - use Text-to-speech w... | 454,830 |
def Speak(self,parameter_name,mode="DEFAULT") """ Speak sound specified by 'parameter_name' either via TTS or by playing a WAV-File Possible modes are: DEFAULT - use mode set by a global parameter (default) WAV_DE - play wav-Files with German Text WAV_EN - play wav-FIles with English Text FEST_EN - use Text-to-speech w... | def Speak(self,parameter_name,mode="DEFAULT") """ Speak sound specified by 'parameter_name' either via TTS or by playing a WAV-File Possible modes are: DEFAULT - use mode set by a global parameter (default) WAV_DE - play wav-Files with German Text WAV_EN - play wav-FIles with English Text FEST_EN - use Text-to-speech w... | 454,831 |
def Speak(self,parameter_name,mode="DEFAULT") """ Speak sound specified by 'parameter_name' either via TTS or by playing a WAV-File Possible modes are: DEFAULT - use mode set by a global parameter (default) WAV_DE - play wav-Files with German Text WAV_EN - play wav-FIles with English Text FEST_EN - use Text-to-speech w... | def Speak(self,parameter_name,mode="DEFAULT") """ Speak sound specified by 'parameter_name' either via TTS or by playing a WAV-File Possible modes are: DEFAULT - use mode set by a global parameter (default) WAV_DE - play wav-Files with German Text WAV_EN - play wav-FIles with English Text FEST_EN - use Text-to-speech w... | 454,832 |
def Speak(self,parameter_name,mode="DEFAULT") """ Speak sound specified by 'parameter_name' either via TTS or by playing a WAV-File Possible modes are: DEFAULT - use mode set by a global parameter (default) WAV_DE - play wav-Files with German Text WAV_EN - play wav-FIles with English Text FEST_EN - use Text-to-speech w... | def Speak(self,parameter_name,mode="DEFAULT") """ Speak sound specified by 'parameter_name' either via TTS or by playing a WAV-File Possible modes are: DEFAULT - use mode set by a global parameter (default) WAV_DE - play wav-Files with German Text WAV_EN - play wav-FIles with English Text FEST_EN - use Text-to-speech w... | 454,833 |
def Trigger(self,component_name,service_name): rospy.loginfo("<<%s>> <<%s>>", service_name, component_name) rospy.loginfo("Waiting for <<%s>> to <<%s>>...", component_name, service_name) service_full_name = "/" + component_name + "_controller/" + service_name try: rospy.wait_for_service(service_full_name,rospy.get_para... | def Trigger(self,component_name,service_name,blocking=True): rospy.loginfo("<<%s>> <<%s>>", service_name, component_name) rospy.loginfo("Waiting for <<%s>> to <<%s>>...", component_name, service_name) service_full_name = "/" + component_name + "_controller/" + service_name try: rospy.wait_for_service(service_full_name,... | 454,834 |
def __check_socket(sock): try: if sock.family != socket.AF_UNIX: raise ValueError("Only AF_UNIX sockets are allowed") sock = sock.fileno() except AttributeError: pass if not isinstance(sock, int): raise TypeError("An socket object or file descriptor was expected") return sock | def __check_socket(sock): if hasattr(sock, 'family') and sock.family != socket.AF_UNIX: raise ValueError("Only AF_UNIX sockets are allowed") if hasattr(sock, 'fileno'): sock = sock.fileno() except AttributeError: pass if not isinstance(sock, int): raise TypeError("An socket object or file descriptor was expected") re... | 454,835 |
def __check_socket(sock): try: if sock.family != socket.AF_UNIX: raise ValueError("Only AF_UNIX sockets are allowed") sock = sock.fileno() except AttributeError: pass if not isinstance(sock, int): raise TypeError("An socket object or file descriptor was expected") return sock | def __check_socket(sock): try: if sock.family != socket.AF_UNIX: raise ValueError("Only AF_UNIX sockets are allowed") sock = sock.fileno() if not isinstance(sock, int): raise TypeError("An socket object or file descriptor was expected") return sock | 454,836 |
def parent_tests(self, s): # First message is not even sent s.send("a") self.vrfy_recv(recvfd(s), "a") s.send("a") self.vrfy_recv(recvfd(s), "\0") s.send("a") self.vrfy_recv(recvfd(s), "foobar") s.send("a") self.vrfy_recv(recvfd(s, msg_buf = 11), "long string") # is long s.send("a") self.assertEquals(s.recv(8), " is lo... | def parent_tests(self, s): # First message is not even sent self.vrfy_recv(recvfd(s), "a") self.vrfy_recv(recvfd(s), "\0") self.vrfy_recv(recvfd(s), "foobar") self.vrfy_recv(recvfd(s, msg_buf = 11), "long string") # is long self.assertEquals(s.recv(8), " is long") # re-sync self.assertEquals(s.recv(100), "foobar") self... | 454,837 |
def parent_tests(self, s): # First message is not even sent s.send("a") self.vrfy_recv(recvfd(s), "a") s.send("a") self.vrfy_recv(recvfd(s), "\0") s.send("a") self.vrfy_recv(recvfd(s), "foobar") s.send("a") self.vrfy_recv(recvfd(s, msg_buf = 11), "long string") # is long s.send("a") self.assertEquals(s.recv(8), " is lo... | def parent_tests(self, s): # First message is not even sent s.send("a") self.vrfy_recv(recvfd(s), "a") s.send("a") self.vrfy_recv(recvfd(s), "\0") s.send("a") self.vrfy_recv(recvfd(s), "foobar") s.send("a") self.vrfy_recv(recvfd(s, msg_buf = 11), "long string") # is long s.send("a") self.assertEquals(s.recv(8), " is lo... | 454,838 |
def put_params(param3=NONE): global param20 | def put_params(param3=NONE): global param20 | 454,839 |
def readinit(): global nparam,mrudir try: for i in range(len(params)): if badlist.count(i)>0: print 'Skipping bad entry in WSPR.INI:\a',params[i] continue key,value=params[i].split() if key == 'WSPRGeometry': root.geometry(value) elif key == 'MyCall': options.MyCall.set(value) elif key == 'MyGrid': options.MyGrid.set... | def readinit(): global nparam,mrudir try: for i in range(len(params)): if badlist.count(i)>0: print 'Skipping bad entry in WSPR.INI:\a',params[i] continue key,value=params[i].split() if key == 'WSPRGeometry': root.geometry(value) elif key == 'MyCall': options.MyCall.set(value) elif key == 'MyGrid': options.MyGrid.set... | 454,840 |
def autolog(decodes): # Random delay of up to 20 seconds to spread load out on server --W1BW time.sleep(random.random() * 20.0) try: # This code originally by W6CQZ ... modified by W1BW # TODO: Cache entries for later uploading if net is down. # TODO: (Maybe??) Allow for stations wishing to collect spot data but # ... | def autolog(decodes): # Random delay of up to 20 seconds to spread load out on server --W1BW time.sleep(random.random() * 20.0) try: # This code originally by W6CQZ ... modified by W1BW # TODO: Cache entries for later uploading if net is down. # TODO: (Maybe??) Allow for stations wishing to collect spot data but # ... | 454,841 |
def update(): global root_geom,isec0,im,pim,ndbm0,nsec0,a,ftx0,nin0,nout0, \ receiving,transmitting,newdat,nscroll,newspec,scale0,offset0, \ modpixmap0,tw,s0,c0,fmid,fmid0,loopall,ntr0,txmsg,iband0, \ bandmap,bm,t0,nreject,gain,phdeg,ierr tsec=time.time() utc=time.gmtime(tsec) nsec=int(tsec) nsec0=nsec ns120=nsec % 12... | def update(): global root_geom,isec0,im,pim,ndbm0,nsec0,a,ftx0,nin0,nout0, \ receiving,transmitting,newdat,nscroll,newspec,scale0,offset0, \ modpixmap0,tw,s0,c0,fmid,fmid0,loopall,ntr0,txmsg,iband0, \ bandmap,bm,t0,nreject,gain,phdeg,ierr,itx0,timer1 tsec=time.time() utc=time.gmtime(tsec) nsec=int(tsec) nsec0=nsec ns1... | 454,842 |
def update(): global root_geom,isec0,im,pim,ndbm0,nsec0,a,ftx0,nin0,nout0, \ receiving,transmitting,newdat,nscroll,newspec,scale0,offset0, \ modpixmap0,tw,s0,c0,fmid,fmid0,loopall,ntr0,txmsg,iband0, \ bandmap,bm,t0,nreject,gain,phdeg,ierr tsec=time.time() utc=time.gmtime(tsec) nsec=int(tsec) nsec0=nsec ns120=nsec % 12... | def update(): global root_geom,isec0,im,pim,ndbm0,nsec0,a,ftx0,nin0,nout0, \ receiving,transmitting,newdat,nscroll,newspec,scale0,offset0, \ modpixmap0,tw,s0,c0,fmid,fmid0,loopall,ntr0,txmsg,iband0, \ bandmap,bm,t0,nreject,gain,phdeg,ierr tsec=time.time() utc=time.gmtime(tsec) nsec=int(tsec) nsec0=nsec ns120=nsec % 12... | 454,843 |
def update(): global root_geom,isec0,im,pim,ndbm0,nsec0,a,ftx0,nin0,nout0, \ receiving,transmitting,newdat,nscroll,newspec,scale0,offset0, \ modpixmap0,tw,s0,c0,fmid,fmid0,loopall,ntr0,txmsg,iband0, \ bandmap,bm,t0,nreject,gain,phdeg,ierr tsec=time.time() utc=time.gmtime(tsec) nsec=int(tsec) nsec0=nsec ns120=nsec % 12... | def update(): global root_geom,isec0,im,pim,ndbm0,nsec0,a,ftx0,nin0,nout0, \ receiving,transmitting,newdat,nscroll,newspec,scale0,offset0, \ modpixmap0,tw,s0,c0,fmid,fmid0,loopall,ntr0,txmsg,iband0, \ bandmap,bm,t0,nreject,gain,phdeg,ierr tsec=time.time() utc=time.gmtime(tsec) nsec=int(tsec) nsec0=nsec ns120=nsec % 12... | 454,844 |
def update(): global root_geom,isec0,im,pim,ndbm0,nsec0,a,ftx0,nin0,nout0, \ receiving,transmitting,newdat,nscroll,newspec,scale0,offset0, \ modpixmap0,tw,s0,c0,fmid,fmid0,loopall,ntr0,txmsg,iband0, \ bandmap,bm,t0,nreject,gain,phdeg,ierr tsec=time.time() utc=time.gmtime(tsec) nsec=int(tsec) nsec0=nsec ns120=nsec % 12... | def update(): global root_geom,isec0,im,pim,ndbm0,nsec0,a,ftx0,nin0,nout0, \ receiving,transmitting,newdat,nscroll,newspec,scale0,offset0, \ modpixmap0,tw,s0,c0,fmid,fmid0,loopall,ntr0,txmsg,iband0, \ bandmap,bm,t0,nreject,gain,phdeg,ierr tsec=time.time() utc=time.gmtime(tsec) nsec=int(tsec) nsec0=nsec ns120=nsec % 12... | 454,845 |
def update(): global root_geom,isec0,im,pim,ndbm0,nsec0,a,ftx0,nin0,nout0, \ receiving,transmitting,newdat,nscroll,newspec,scale0,offset0, \ modpixmap0,tw,s0,c0,fmid,fmid0,loopall,ntr0,txmsg,iband0, \ bandmap,bm,t0,nreject,gain,phdeg,ierr tsec=time.time() utc=time.gmtime(tsec) nsec=int(tsec) nsec0=nsec ns120=nsec % 12... | def update(): global root_geom,isec0,im,pim,ndbm0,nsec0,a,ftx0,nin0,nout0, \ receiving,transmitting,newdat,nscroll,newspec,scale0,offset0, \ modpixmap0,tw,s0,c0,fmid,fmid0,loopall,ntr0,txmsg,iband0, \ bandmap,bm,t0,nreject,gain,phdeg,ierr tsec=time.time() utc=time.gmtime(tsec) nsec=int(tsec) nsec0=nsec ns120=nsec % 12... | 454,846 |
def readinit(): global nparam,mrudir try: for i in range(len(params)): if badlist.count(i)>0: print 'Skipping bad entry in WSPR.INI:\a',params[i] continue key,value=params[i].split() if key == 'WSPRGeometry': root.geometry(value) elif key == 'MyCall': options.MyCall.set(value) elif key == 'MyGrid': options.MyGrid.set... | defreadinit():globalnparam,mrudirtry:foriinrange(len(params)):ifbadlist.count(i)>0:print'SkippingbadentryinWSPR.INI:\a',params[i]continuekey,value=params[i].split()ifkey=='WSPRGeometry':root.geometry(value)elifkey=='MyCall':options.MyCall.set(value)elifkey=='MyGrid':options.MyGrid.set(value)elifkey=='CWID':advanced.idi... | 454,847 |
def update(): global root_geom,isec0,im,pim,ndbm0,nsec0,a,ftx0,nin0,nout0, \ receiving,transmitting,newdat,nscroll,newspec,scale0,offset0, \ modpixmap0,tw,s0,c0,fmid,fmid0,loopall,ntr0,txmsg,iband0, \ bandmap,bm,t0,nreject,gain,phdeg if hopping_feature==1: if hopping.hoppingconfigured.get()==1: bhopping.configure(stat... | def update(): global root_geom,isec0,im,pim,ndbm0,nsec0,a,ftx0,nin0,nout0, \ receiving,transmitting,newdat,nscroll,newspec,scale0,offset0, \ modpixmap0,tw,s0,c0,fmid,fmid0,loopall,ntr0,txmsg,iband0, \ bandmap,bm,t0,nreject,gain,phdeg if hopping_feature==1: if hopping.hoppingconfigured.get()==1: bhopping.configure(stat... | 454,848 |
def ModeISCAT(event=NONE): global isync if g.mode != "ISCAT": if lauto: toggleauto() ModeJT6M() mode.set("ISCAT") lab2.configure(text='FileID Avg dB DF') isync=-18 report.configure(state=NORMAL) report.delete(0,END) report.insert(0,'-15') | def ModeISCAT(event=NONE): global isync,isync_iscat if g.mode != "ISCAT": if lauto: toggleauto() ModeJT6M() mode.set("ISCAT") lab2.configure(text='FileID Avg dB DF') isync=-18 report.configure(state=NORMAL) report.delete(0,END) report.insert(0,'-15') | 454,849 |
def ModeISCAT(event=NONE): global isync if g.mode != "ISCAT": if lauto: toggleauto() ModeJT6M() mode.set("ISCAT") lab2.configure(text='FileID Avg dB DF') isync=-18 report.configure(state=NORMAL) report.delete(0,END) report.insert(0,'-15') | def ModeISCAT(event=NONE): global isync if g.mode != "ISCAT": if lauto: toggleauto() ModeJT6M() mode.set("ISCAT") lab2.configure(text='FileID Avg dB DF') isync=isync_iscat lsync.configure(text=slabel+str(isync)) shmsg.configure(state=NORMAL) nfreeze.set(0) report.configure(state=NORMAL) report.delete(0,END)... | 454,850 |
def update(): global root_geom,isec0,naz,nel,ndmiles,ndkm,nhotaz,nhotabetter,nopen, \ im,pim,cmap0,isync,isync441,isync6m,isync65,isync_save,idsec, \ first,itol,txsnrdb,tx6alt utc=time.gmtime(time.time()+0.1*idsec) isec=utc[5] if isec != isec0: #Do once per second isec0=isec t=time.strftime(... | def update(): global root_geom,isec0,naz,nel,ndmiles,ndkm,nhotaz,nhotabetter,nopen, \ im,pim,cmap0,isync,isync441,isync6m,isync_iscat,isync65, \ isync_save,idsec,first,itol,txsnrdb,tx6alt utc=time.gmtime(time.time()+0.1*idsec) isec=utc[5] if isec != isec0: #Do once per second isec0=ise... | 454,851 |
def update(): global root_geom,isec0,naz,nel,ndmiles,ndkm,nhotaz,nhotabetter,nopen, \ im,pim,cmap0,isync,isync441,isync6m,isync65,isync_save,idsec, \ first,itol,txsnrdb,tx6alt utc=time.gmtime(time.time()+0.1*idsec) isec=utc[5] if isec != isec0: #Do once per second isec0=isec t=time.strftime(... | def update(): global root_geom,isec0,naz,nel,ndmiles,ndkm,nhotaz,nhotabetter,nopen, \ im,pim,cmap0,isync,isync441,isync6m,isync65,isync_save,idsec, \ first,itol,txsnrdb,tx6alt utc=time.gmtime(time.time()+0.1*idsec) isec=utc[5] if isec != isec0: #Do once per second isec0=isec t=time.strftime(... | 454,852 |
def update(): global root_geom,isec0,naz,nel,ndmiles,ndkm,nhotaz,nhotabetter,nopen, \ im,pim,cmap0,isync,isync441,isync6m,isync65,isync_save,idsec, \ first,itol,txsnrdb,tx6alt utc=time.gmtime(time.time()+0.1*idsec) isec=utc[5] if isec != isec0: #Do once per second isec0=isec t=time.strftime(... | def update(): global root_geom,isec0,naz,nel,ndmiles,ndkm,nhotaz,nhotabetter,nopen, \ im,pim,cmap0,isync,isync441,isync6m,isync65,isync_save,idsec, \ first,itol,txsnrdb,tx6alt utc=time.gmtime(time.time()+0.1*idsec) isec=utc[5] if isec != isec0: #Do once per second isec0=isec t=time.strftime(... | 454,853 |
def update(): global root_geom,isec0,im,pim,ndbm0,nsec0,a,ftx0,nin0,nout0, \ receiving,transmitting,newdat,nscroll,newspec,scale0,offset0, \ modpixmap0,tw,s0,c0,fmid,fmid0,loopall,ntr0,txmsg,iband0, \ bandmap,bm,t0,nreject,gain,phdeg tsec=time.time() utc=time.gmtime(tsec) nsec=int(tsec) nsec0=nsec ns120=nsec % 120 try... | def update(): global root_geom,isec0,im,pim,ndbm0,nsec0,a,ftx0,nin0,nout0, \ receiving,transmitting,newdat,nscroll,newspec,scale0,offset0, \ modpixmap0,tw,s0,c0,fmid,fmid0,loopall,ntr0,txmsg,iband0, \ bandmap,bm,t0,nreject,gain,phdeg tsec=time.time() utc=time.gmtime(tsec) nsec=int(tsec) nsec0=nsec ns120=nsec % 120 try... | 454,854 |
def update(): global root_geom,isec0,im,pim,ndbm0,nsec0,a,ftx0,nin0,nout0, \ receiving,transmitting,newdat,nscroll,newspec,scale0,offset0, \ modpixmap0,tw,s0,c0,fmid,fmid0,loopall,ntr0,txmsg,iband0, \ bandmap,bm,t0,nreject,gain,phdeg tsec=time.time() utc=time.gmtime(tsec) nsec=int(tsec) nsec0=nsec ns120=nsec % 120 try... | def update(): global root_geom,isec0,im,pim,ndbm0,nsec0,a,ftx0,nin0,nout0, \ receiving,transmitting,newdat,nscroll,newspec,scale0,offset0, \ modpixmap0,tw,s0,c0,fmid,fmid0,loopall,ntr0,txmsg,iband0, \ bandmap,bm,t0,nreject,gain,phdeg tsec=time.time() utc=time.gmtime(tsec) nsec=int(tsec) nsec0=nsec ns120=nsec % 120 try... | 454,855 |
def readinit(): global nparam,mrudir try: for i in range(len(params)): if badlist.count(i)>0: print 'Skipping bad entry in WSPR.INI:\a',params[i] continue key,value=params[i].split() if key == 'WSPRGeometry': root.geometry(value) elif key == 'MyCall': options.MyCall.set(value) elif key == 'MyGrid': options.MyGrid.set... | def readinit(): global nparam,mrudir try: for i in range(len(params)): if badlist.count(i)>0: print 'Skipping bad entry in WSPR.INI:\a',params[i] continue key,value=params[i].split() if key == 'WSPRGeometry': root.geometry(value) elif key == 'MyCall': options.MyCall.set(value) elif key == 'MyGrid': options.MyGrid.set... | 454,856 |
def dtdf_change(event): if mode.get()[:4]=='JTMS': t="%.1f" % (event.x*30.0/500.0,) lab6.configure(text=t,bg='green') else: if event.y<40 and Audio.gcom2.nspecial==0: lab1.configure(text='Time (s)',bg="#33FFFF") #light blue | def dtdf_change(event): if mode.get()[:4]=='JTMS': t="%.1f" % (event.x*30.0/500.0,) lab6.configure(text=t,bg='green') else: if event.y<40 and Audio.gcom2.nspecial==0 and mode.get()<>'ISCAT': lab1.configure(text='Time (s)',bg="#33FFFF") #light blue | 454,857 |
def dtdf_change(event): if mode.get()[:4]=='JTMS': t="%.1f" % (event.x*30.0/500.0,) lab6.configure(text=t,bg='green') else: if event.y<40 and Audio.gcom2.nspecial==0: lab1.configure(text='Time (s)',bg="#33FFFF") #light blue | def dtdf_change(event): if mode.get()[:4]=='JTMS': t="%.1f" % (event.x*30.0/500.0,) lab6.configure(text=t,bg='green') else: if event.y<40 and Audio.gcom2.nspecial==0: lab1.configure(text='Time (s)',bg="#33FFFF") #light blue | 454,858 |
def dtdf_change(event): if mode.get()[:4]=='JTMS': t="%.1f" % (event.x*30.0/500.0,) lab6.configure(text=t,bg='green') else: if event.y<40 and Audio.gcom2.nspecial==0: lab1.configure(text='Time (s)',bg="#33FFFF") #light blue | def dtdf_change(event): if mode.get()[:4]=='JTMS': t="%.1f" % (event.x*30.0/500.0,) lab6.configure(text=t,bg='green') else: if event.y<40 and Audio.gcom2.nspecial==0: lab1.configure(text='Time (s)',bg="#33FFFF") #light blue | 454,859 |
def mouse_up_g1(event): global nopen,nxa if mode.get()=='ISCAT': if abs(event.x-nxa)>10: nxb=min(event.x,500) if nxb<nxa: t=nxb nxb=nxa nxa=t Audio.gcom2.nxa=nxa Audio.gcom2.nxb=nxb decode() else: if not nopen: mdf=int(Audio.gcom2.idf+(event.x-250)*5.859) if mdf<-400: mdf=-400 if mdf>400: mdf=400 Audio.gcom2.mousedf=md... | def mouse_up_g1(event): global nopen,nxa if mode.get()=='ISCAT': if abs(event.x-nxa)>10: nxb=min(event.x,500) if nxb<nxa: t=nxb nxb=nxa nxa=t Audio.gcom2.nxa=nxa Audio.gcom2.nxb=nxb decode() else: if not nopen: mdf=int(Audio.gcom2.idf+(event.x-250)*2.9296875) if mdf<-400: mdf=-400 if mdf>400: mdf=400 Audio.gcom2.moused... | 454,860 |
def put_params(param3=NONE): global param20 | def put_params(param3=NONE): global param20 | 454,861 |
def plot_large(): "Plot the green, red, and blue curves." graph1.delete(ALL) y=[] ngreen=Audio.gcom2.ngreen if ngreen>0: for i in range(ngreen): #Find ymax for green curve green=Audio.gcom2.green[i] y.append(green) ymax=max(y) ymin=min(y) if ymax<1: ymax=1 yfac=4.0 if ymax>75.0/yfac: yfac=75.0/ymax xy=[] fo... | def plot_large(): "Plot the green, red, and blue curves." graph1.delete(ALL) y=[] ngreen=Audio.gcom2.ngreen if ngreen>0: for i in range(ngreen): #Find ymax for green curve green=Audio.gcom2.green[i] y.append(green) ymax=max(y) ymin=min(y) if ymax<1: ymax=1 yfac=4.0 if ymax>75.0/yfac: yfac=75.0/ymax xy=[] fo... | 454,862 |
def audio_config(): inbad,outbad=Audio.audiodev(g.ndevin.get(),g.ndevout.get()) options.inbad.set(inbad) options.outbad.set(outbad) if inbad or outbad: Audio.gcom2.ndevsok=0 options1() else: Audio.gcom2.ndevsok=1 | def audio_config(): inbad,outbad=Audio.audiodev(g.ndevin.get(),g.ndevout.get()) options.inbad.set(inbad) options.outbad.set(outbad) if inbad or outbad: Audio.gcom2.ndevsok=0 options1() else: Audio.gcom2.ndevsok=1 | 454,863 |
def audio_config(): inbad,outbad=Audio.audiodev(g.ndevin.get(),g.ndevout.get()) options.inbad.set(inbad) options.outbad.set(outbad) if inbad or outbad: Audio.gcom2.ndevsok=0 options1() else: Audio.gcom2.ndevsok=1 | def audio_config(): inbad,outbad=Audio.audiodev(g.ndevin.get(),g.ndevout.get()) options.inbad.set(inbad) options.outbad.set(outbad) if inbad or outbad: Audio.gcom2.ndevsok=0 options1() else: Audio.gcom2.ndevsok=1 | 454,864 |
def audio_config(): inbad,outbad=Audio.audiodev(g.ndevin.get(),g.ndevout.get()) options.inbad.set(inbad) options.outbad.set(outbad) if inbad or outbad: Audio.gcom2.ndevsok=0 options1() else: Audio.gcom2.ndevsok=1 | def audio_config(): inbad,outbad=Audio.audiodev(g.ndevin.get(),g.ndevout.get()) options.inbad.set(inbad) options.outbad.set(outbad) if inbad or outbad: Audio.gcom2.ndevsok=0 options1() else: Audio.gcom2.ndevsok=1 | 454,865 |
def audio_config(): inbad,outbad=Audio.audiodev(g.ndevin.get(),g.ndevout.get()) options.inbad.set(inbad) options.outbad.set(outbad) if inbad or outbad: Audio.gcom2.ndevsok=0 options1() else: Audio.gcom2.ndevsok=1 | def audio_config(): inbad,outbad=Audio.audiodev(g.ndevin.get(),g.ndevout.get()) options.inbad.set(inbad) options.outbad.set(outbad) if inbad or outbad: Audio.gcom2.ndevsok=0 options1() else: Audio.gcom2.ndevsok=1 | 454,866 |
def audio_config(): inbad,outbad=Audio.audiodev(g.ndevin.get(),g.ndevout.get()) options.inbad.set(inbad) options.outbad.set(outbad) if inbad or outbad: Audio.gcom2.ndevsok=0 options1() else: Audio.gcom2.ndevsok=1 | def audio_config(): inbad,outbad=Audio.audiodev(g.ndevin.get(),g.ndevout.get()) options.inbad.set(inbad) options.outbad.set(outbad) if inbad or outbad: Audio.gcom2.ndevsok=0 options1() else: Audio.gcom2.ndevsok=1 | 454,867 |
def audio_config(): inbad,outbad=Audio.audiodev(g.ndevin.get(),g.ndevout.get()) options.inbad.set(inbad) options.outbad.set(outbad) if inbad or outbad: Audio.gcom2.ndevsok=0 options1() else: Audio.gcom2.ndevsok=1 | def audio_config(): inbad,outbad=Audio.audiodev(g.ndevin.get(),g.ndevout.get()) options.inbad.set(inbad) options.outbad.set(outbad) if inbad or outbad: Audio.gcom2.ndevsok=0 options1() else: Audio.gcom2.ndevsok=1 | 454,868 |
def audio_config(): inbad,outbad=Audio.audiodev(g.ndevin.get(),g.ndevout.get()) options.inbad.set(inbad) options.outbad.set(outbad) if inbad or outbad: Audio.gcom2.ndevsok=0 options1() else: Audio.gcom2.ndevsok=1 | def audio_config(): inbad,outbad=Audio.audiodev(g.ndevin.get(),g.ndevout.get()) options.inbad.set(inbad) options.outbad.set(outbad) if inbad or outbad: Audio.gcom2.ndevsok=0 options1() else: Audio.gcom2.ndevsok=1 | 454,869 |
def audio_config(): inbad,outbad=Audio.audiodev(g.ndevin.get(),g.ndevout.get()) options.inbad.set(inbad) options.outbad.set(outbad) if inbad or outbad: Audio.gcom2.ndevsok=0 options1() else: Audio.gcom2.ndevsok=1 | def audio_config(): inbad,outbad=Audio.audiodev(g.ndevin.get(),g.ndevout.get()) options.inbad.set(inbad) options.outbad.set(outbad) if inbad or outbad: Audio.gcom2.ndevsok=0 options1() else: Audio.gcom2.ndevsok=1 | 454,870 |
def update(): global root_geom,isec0,im,pim,ndbm0,nsec0,a,ftx0,nin0,nout0, \ receiving,transmitting,newdat,nscroll,newspec,scale0,offset0, \ modpixmap0,tw,s0,c0,fmid,fmid0,loopall,ntr0,txmsg,iband0, \ bandmap,bm,t0,nreject,gain,phdeg if hopping_feature==1 and hopping.hopping==1: w.acom1.nfhopping=1 if w.acom1.nfhopok... | def update(): global root_geom,isec0,im,pim,ndbm0,nsec0,a,ftx0,nin0,nout0, \ receiving,transmitting,newdat,nscroll,newspec,scale0,offset0, \ modpixmap0,tw,s0,c0,fmid,fmid0,loopall,ntr0,txmsg,iband0, \ bandmap,bm,t0,nreject,gain,phdeg if hopping_feature==1 and hopping.hopping==1: w.acom1.nfhopping=1 if w.acom1.nfhopok... | 454,871 |
def load_mod_common(self): self.load_mod_users() self.load_mod_siteinfo() self.load_mod_categories() self.load_mod_articles() self.load_mod_tags() self.load_mod_comments() self.load_mod_links() self.load_mod_styles() self.load_mod_images() self.load_mod_widgets() | def load_mod_common(self): self.load_mod_users() self.load_mod_siteinfo() self.load_mod_articles() self.load_mod_tags() self.load_mod_comments() self.load_mod_links() self.load_mod_styles() self.load_mod_images() self.load_mod_widgets() | 454,872 |
def run(self): """Repeatedly process the job queue until told to exit.""" while True: if self._dismissed.isSet(): # we are dismissed, break out of loop break # get next work request. If we don't get a new request from the # queue after self._poll_timout seconds, we jump to the start of # the while loop again, to give t... | def run(self): """Repeatedly process the job queue until told to exit.""" while True: if self._dismissed.isSet(): # we are dismissed, break out of loop break # get next work request. If we don't get a new request from the # queue after self._poll_timout seconds, we jump to the start of # the while loop again, to give t... | 454,873 |
def poll(self, block=False): """Process any new results in the queue.""" while True: # still results pending? if not self.workRequests: raise NoResultsPending # are there still workers to process remaining requests? elif block and not self.workers: raise NoWorkersAvailable try: # get back next results request, result =... | def poll(self, block=False): """Process any new results in the queue.""" while True: # still results pending? if not self.workRequests: raise NoResultsPending # are there still workers to process remaining requests? elif block and not self.workers: raise NoWorkersAvailable try: # get back next results request, result =... | 454,874 |
def getchunkname(x, y): def base36encode(number): sign = '' if not isinstance(number, (int, long)): raise TypeError('number must be an integer') if number < 0: #raise ValueError('number must be positive') sign = '-' number = number * -1 alphabet = '0123456789abcdefghijklmnopqrstuvwxyz' base36 = '' while number: numbe... | def getchunkname(chunk_x, chunk_y): def base36encode(number): sign = '' if not isinstance(number, (int, long)): raise TypeError('number must be an integer') if number < 0: #raise ValueError('number must be positive') sign = '-' number = number * -1 alphabet = '0123456789abcdefghijklmnopqrstuvwxyz' base36 = '' while n... | 454,875 |
def base36encode(number): sign = '' if not isinstance(number, (int, long)): raise TypeError('number must be an integer') if number < 0: #raise ValueError('number must be positive') sign = '-' number = number * -1 | def base36encode(number): sign = '' if not isinstance(number, (int, long)): raise TypeError('number must be an integer') if number < 0: #raise ValueError('number must be positive') sign = '-' number = number * -1 | 454,876 |
def map_chunk_slice(x, z, y = 64): map_directory = "D:\\Minemap\\!CURRENT\\dev\\shm\\rsync\\smp2\\smp\\World10\\" chunkname = map_directory + getchunkname(x, z) chunk = gzip.open(chunkname, 'r') output = read_tag(chunk) print output[0] try: for level in output[2]: # skip end tags if (level[0] == 0): continue for ... | def map_chunk_slice(x, z, y = 64): map_directory = "D:\\Minemap\\!CURRENT\\dev\\shm\\rsync\\smp2\\smp\\World10\\" chunkname = map_directory + getchunkname(x, z) chunk = gzip.open(chunkname, 'r') output = read_tag(chunk) print output[0] try: for level in output[2]: # skip end tags if (level[0] == 0): continue for ... | 454,877 |
def map_chunk_slice(x, z, y = 64): map_directory = "D:\\Minemap\\!CURRENT\\dev\\shm\\rsync\\smp2\\smp\\World10\\" chunkname = map_directory + getchunkname(x, z) chunk = gzip.open(chunkname, 'r') output = read_tag(chunk) print output[0] try: for level in output[2]: # skip end tags if (level[0] == 0): continue for ... | def map_chunk_slice(x, z, y = 64): map_directory = "D:\\Minemap\\!CURRENT\\dev\\shm\\rsync\\smp2\\smp\\World10\\" chunkname = map_directory + getchunkname(x, z) chunk = gzip.open(chunkname, 'r') output = read_tag(chunk) print output[0] try: for level in output[2]: # skip end tags if (level[0] == 0): continue for ... | 454,878 |
def get_cropbox(x, y): return (x*16, y*16, x*16 + 16, y*16 + 16) | def get_cropbox(x, y): return (x*16, y*16, x*16 + 16, y*16 + 16) | 454,879 |
def read_list_payload(chunk): list_item_type = ord(chunk.read(1)) list_length = unpack('>l', chunk.read(4))[0] print "%d items of type %s" % (list_length, tag_types[list_item_type]) | def read_list_payload(chunk): list_item_type = ord(chunk.read(1)) list_length = unpack('>l', chunk.read(4))[0] | 454,880 |
def read_byte_array(chunk): length = read_int(chunk) print "Array length: %d" % length payload = chunk.read(length) return payload | def read_byte_array(chunk): length = read_int(chunk) payload = chunk.read(length) return payload | 454,881 |
def read_compound(chunk): payload = [] tag = read_tag(chunk) payload.append(tag) tag_type = tag[0] while (tag_type > 0): tag = read_tag(chunk) payload.append(tag) tag_type = tag[0] print "Read %d elements in compound" % len(payload) return payload | def read_compound(chunk): payload = [] tag = read_tag(chunk) payload.append(tag) tag_type = tag[0] while (tag_type > 0): tag = read_tag(chunk) payload.append(tag) tag_type = tag[0] return payload | 454,882 |
def read_string(chunk): str_length = unpack('>h', chunk.read(2))[0] if (str_length > 0): str = chunk.read(str_length) #print "Name: %s" % name else: str = None return str | defread_string(chunk):str_length=unpack('>h',chunk.read(2))[0]if(str_length>0):str=chunk.read(str_length)#print"Name:%s"%nameelse:str=Nonereturnstr | 454,883 |
def read_tag(chunk): type = ord(chunk.read(1)) # Chunk starts with "10" byte print "Found tag type: %s" % (tag_types[type], ) if (type > 0): name = read_string(chunk) if (name != None): print "Name: %s" % name else: name = '' payload = None # Read payload of each tag. "0" tag has no payload if (type == 1): payload = r... | def read_tag(chunk): type = ord(chunk.read(1)) # Chunk starts with "10" byte if (type > 0): name = read_string(chunk) if (name != None): print "Name: %s" % name else: name = '' payload = None # Read payload of each tag. "0" tag has no payload if (type == 1): payload = read_byte(chunk) elif (type == 2): payload = read... | 454,884 |
def read_tag(chunk): type = ord(chunk.read(1)) # Chunk starts with "10" byte print "Found tag type: %s" % (tag_types[type], ) if (type > 0): name = read_string(chunk) if (name != None): print "Name: %s" % name else: name = '' payload = None # Read payload of each tag. "0" tag has no payload if (type == 1): payload = r... | def read_tag(chunk): type = ord(chunk.read(1)) # Chunk starts with "10" byte print "Found tag type: %s" % (tag_types[type], ) if (type > 0): name = read_string(chunk) else: name = '' payload = None # Read payload of each tag. "0" tag has no payload if (type == 1): payload = read_byte(chunk) elif (type == 2): payload... | 454,885 |
def map_chunk_slice(x, z, y = 64): map_directory = "D:\\Minemap\\!CURRENT\\dev\\shm\\rsync\\smp2\\smp\\World10\\" chunkname = map_directory + getchunkname(x, z) chunk = gzip.open(chunkname, 'r') output = read_tag(chunk) print output[0] try: for level in output[2]: # skip end tags if (level[0] == 0): continue for ... | def map_chunk_slice(x, z, y = 64): map_directory = "D:\\Minemap\\!CURRENT\\dev\\shm\\rsync\\smp2\\smp\\World10\\" chunkname = map_directory + getchunkname(x, z) chunk = gzip.open(chunkname, 'r') output = read_tag(chunk) blocks = None try: for level in output[2]: # skip end tags if (level[0] == 0): continue for ... | 454,886 |
def map_chunk_slice(x, z, y = 64): map_directory = "D:\\Minemap\\!CURRENT\\dev\\shm\\rsync\\smp2\\smp\\World10\\" chunkname = map_directory + getchunkname(x, z) chunk = gzip.open(chunkname, 'r') output = read_tag(chunk) print output[0] try: for level in output[2]: # skip end tags if (level[0] == 0): continue for ... | def map_chunk_slice(x, z, y = 64): map_directory = "D:\\Minemap\\!CURRENT\\dev\\shm\\rsync\\smp2\\smp\\World10\\" chunkname = map_directory + getchunkname(x, z) chunk = gzip.open(chunkname, 'r') output = read_tag(chunk) print output[0] try: for level in output[2]: # skip end tags if (level[0] == 0): continue for ... | 454,887 |
def map_chunk_slice(x, z, y = 64): map_directory = "D:\\Minemap\\!CURRENT\\dev\\shm\\rsync\\smp2\\smp\\World10\\" chunkname = map_directory + getchunkname(x, z) chunk = gzip.open(chunkname, 'r') output = read_tag(chunk) print output[0] try: for level in output[2]: # skip end tags if (level[0] == 0): continue for ... | def map_chunk_slice(x, z, y = 64): map_directory = "D:\\Minemap\\!CURRENT\\dev\\shm\\rsync\\smp2\\smp\\World10\\" chunkname = map_directory + getchunkname(x, z) chunk = gzip.open(chunkname, 'r') output = read_tag(chunk) print output[0] try: for level in output[2]: # skip end tags if (level[0] == 0): continue for ... | 454,888 |
def get_cropbox(x, y): return (x*16, y*16, x*16 + 16, y*16 + 16) | def get_cropbox(x, y): return (x*16, y*16, x*16 + 16, y*16 + 16) | 454,889 |
def get_cropbox(x, y): return (x*16, y*16, x*16 + 16, y*16 + 16) | def get_cropbox(x, y): return (x*16, y*16, x*16 + 16, y*16 + 16) | 454,890 |
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, write_output): ''' Computes HCP response and RE/RBE using Katz\' Ion-Gamma-Kill approach according to Waligorski, 1988 | 454,891 |
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.write_output... | 454,892 |
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, t... | 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, t... | 454,893 |
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,894 |
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,895 |
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,896 |
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,897 |
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,898 |
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,899 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.