Utility for debugging.
434724
def ellplot (mjr, mnr, pa):
    """"""
    _ellcheck (mjr, mnr, pa)
    import omega as om

    th = np.linspace (0, 2 * np.pi, 200)
    x, y = ellpoint (mjr, mnr, pa, th)
    return om.quickXY (x, y, 'mjr=%f mnr=%f pa=%f' %
                       (mjr, mnr, pa * 180 / np.pi))
1228701
def debug_callback(event, *args, **kwds):
    '''
    '''
    l = ['event %s' % (event.type,)]
    if args:
        l.extend(map(str, args))
    if kwds:
        l.extend(sorted('%s=%s' % t for t in kwds.items()))
    print('Debug callback (%s)' % ', '.join(l))
1321503
def printd(*args, **kwargs):
    """"""

    global settings
    if settings['PRINT_DEBUG_STATE']:
        print(*args, **kwargs)
        return True
    return False
23217
def init_debug(self):
        """"""
        import signal

        def debug_trace(sig, frame):
            """Interrupt running process, and provide a python prompt for interactive
            debugging."""

            self.log('Trace signal received')
            self.log(''.join(traceback.format_stack(frame)))

        signal.signal(signal.SIGUSR2, debug_trace)
63021
def print_debug(*args, **kwargs):
    
    if WTF_CONFIG_READER.get("debug", False) == True:
        print(*args, **kwargs)
912487
def debug(message)
      (m = filter(message, :debug)) && each {|l| l.debug(m)}
    end
788070
function debug() {
  return fritz.getDeviceList().then(function(devices) {
    console.log("Raw devices\n");
    console.log(devices);
  });
}
434484
def debug_string(self):
        """"""

        if self._resources_initialized:
            status = "Resources requested: {}/{} CPUs, {}/{} GPUs".format(
                self._committed_resources.cpu, self._avail_resources.cpu,
                self._committed_resources.gpu, self._avail_resources.gpu)
            customs = ", ".join([
                "{}/{} {}".format(
                    self._committed_resources.get_res_total(name),
                    self._avail_resources.get_res_total(name), name)
                for name in self._avail_resources.custom_resources
            ])
            if customs:
                status += " ({})".format(customs)
            return status
        else:
            return "Resources requested: ?"
68500
def debug(self, *debugReqs):
        """"""
        return self._client.send(debug=sc2api_pb2.RequestDebug(debug=debugReqs))
1042949
def debug_transform(ctx, transform, params, value, fields):
    """"""
    from canari.commands.debug_transform import debug_transform
    debug_transform(transform, value, fields, params, ctx.project, ctx.config)
938723
def init_debug():
    """"""
    global debug_stats
    global QueueLength
    if debug_stats is None:
        list_defaultdict = partial(defaultdict, list)
        debug_stats = defaultdict(list_defaultdict)
        QueueLength = []
14986
def debug(self, msg):
        '''
        
        '''
        # If debug is not disabled
        if self.__debug is not False:

            # If never was set, try to set it up
            if self.__debug is None:

                # Check what do we have inside settings
                debug_filename = getattr(settings, "AD_DEBUG_FILE", None)
                if debug_filename:
                    # Open the debug file pointer
                    self.__debug = open(settings.AD_DEBUG_FILE, 'a')
                else:
                    # Disable debuging forever
                    self.__debug = False

            if self.__debug:
                # Debug the given message
                self.__debug.write("{}\n".format(msg))
                self.__debug.flush()
706417
def debug(self, msg, indent=0, **kwargs):
        """"""
        return self.logger.debug(self._indent(msg, indent), **kwargs)
449386
def debug(ftn, txt):
    """"""
    if debug_p:
        sys.stdout.write("{0}.{1}:{2}\n".format(modname, ftn, txt))
        sys.stdout.flush()
335824
def debug(self, *msg):
        
        label = colors.yellow("DEBUG")
        self._msg(label, *msg)
1058840
def print_debug(self, msg):
        """"""
        assert isinstance(msg, bytes)
        state = STATE_NAMES[self.state].encode()
        console_output(b'[dbg] ' + self.display_name.encode() + b'[' + state +
                       b']: ' + msg + b'\n')
173433
def set_debug(self, status):
        """"""
        if status:
            self.logger.setLevel('DEBUG')
        else:
            self.logger.setLevel('INFO')