Same as Parameterized.pprint, except that X.classname(Y
        is replaced with X.classname.instance(Y
505381
def pprint(self, imports=None, prefix="\n    ",unknown_value='<?>',
               qualify=False, separator=""):
        
        r = Parameterized.pprint(self,imports,prefix,
                                 unknown_value=unknown_value,
                                 qualify=qualify,separator=separator)
        classname=self.__class__.__name__
        return r.replace(".%s("%classname,".%s.instance("%classname)
305465
def check_vprint(s, vprinter):
    ''''''
    if vprinter is True:
        print(s);
    elif callable(vprinter):
        vprinter(s);
678342
function pprintJSON(formJson, opts, indentLevel, priorNodeStr) {
  opts = opts || {};
  opts.spaces = opts.spaces || 2;
  opts.lbracket = opts.lbracket || "[";
  opts.rbracket = opts.rbracket || "]";
  opts.separator = opts.separator || ", ";
  indentLevel = indentLevel || 0;
  var nl = opts.oneLine ? " " : "\n";
  var str = ""

  function indentToSpaces(indentLevel) {
    return(!opts.omitTop ? indentLevel * opts.spaces : (indentLevel - 1) * opts.spaces);
  }

  if(Array.isArray(formJson)) {
    var numSpaces = indentToSpaces(indentLevel);
    if(!(opts.omitTop && indentLevel === 0)) {
      // I added these last two checks below specifically for formatting html tags
      // (the length check might adversely effect formatting normal code not sure yet )
      if((priorNodeStr !== '"function"' && priorNodeStr !== 'function') &&
          formJson.length > 0 && formJson[0] !== "attr") {
        str += (priorNodeStr ? nl : "") // omit the unecessary *first* "\n"
        str += (priorNodeStr && numSpaces > 0 ? " ".repeat(numSpaces) : "")
      }
      str += opts.lbracket
    }

    if(formJson[0] === "object" || formJson[0] === "attr") {
      if(opts.attrsAsJson || opts.objectsAsJson) {
        // pretty print the key/value pairs of an object/attr as a js object:
        str += "{";
        for(var i=1; i<formJson.length;i+=2) {
          if(i === 1) { str += nl; }
          var propNameStr = pprintJSON(formJson[i], opts);
          propNameStr = ((propNameStr.indexOf("-") !== -1) ? '"' + propNameStr + '"' : propNameStr);
          str += (numSpaces+1 > 0 ? " ".repeat(indentToSpaces(indentLevel+1)) : "") +
                  propNameStr + ": " +
                  pprintJSON(formJson[i+1], opts, indentLevel + 2, formJson[i]) + (i+2 < formJson.length ? opts.separator : "") + nl;
        }
        str += "}";
      }
      else {
        // pretty print the key/value pairs of an object/attr as an s-expr list
        str += pprintJSON(formJson[0], opts) + opts.separator + nl;
        for(var i=1; i<formJson.length;i+=2) {
          str += (numSpaces+1 > 0 ? " ".repeat(indentToSpaces(indentLevel+1)) : "") +
                 pprintJSON(formJson[i], opts) + opts.separator +
                 pprintJSON(formJson[i+1], opts, indentLevel + 2, formJson[i]) + (i+2 < formJson.length ? opts.separator : "") + nl;
        }
      }
    }
    else {
      // pretty print the body of a normal list
      var priorNodeStr;
      formJson.forEach(function(node, i) {
        priorNodeStr = pprintJSON(node, opts, indentLevel + 1, priorNodeStr)
        str += priorNodeStr
        if(i < formJson.length - 1) {
          str += opts.separator
        }
      })
    }
    if(!(opts.omitTop && indentLevel === 0)) {
      str += opts.rbracket
    }
  }
  else if(formJson == null) {
    str += "null";
  }
  else if(typeof formJson === 'string' && !opts.bareSymbols) {
    // I had backslashed single quotes below -
    // but jsonlint rejected so I don't...
    str += ('"' + formJson.replace(/[\\"]/g, '\\$&') + '"')
  }
  else if(formJson.toString) {
    str += formJson.toString();
  }
  else {
    throw new Error('Unknown form type in pprintJSON: ' + formJson + ' (' + typeof formJson + ')');
  }
  return str
}
274725
def pprint(j, no_pretty):
    
    if not no_pretty:
        click.echo(
            json.dumps(j, cls=PotionJSONEncoder, sort_keys=True, indent=4, separators=(",", ": "))
        )
    else:
        click.echo(j)
474442
def j(*args, **kwargs):
    
    if not args:
        raise ValueError("you didn't pass any arguments to print out")

    with Reflect.context(args, **kwargs) as r:
        instance = J_CLASS(r, stream, **kwargs)
        instance()
504759
static void printList(final PrintWriter pw, final List<?> l) {
        for (int i = 0; i < l.size(); ++i) {
            Object o = l.get(i);
            if (o instanceof List) {
                printList(pw, (List<?>) o);
            } else {
                pw.print(o.toString());
            }
        }
    }
1148438
def pprint_arg(vnames, value):
    
    ret = ''
    for name, v in zip(vnames, value):
        ret += '%s=%s;' % (name, str(v))
    return ret;
653911
def pprint(object, stream=None, indent=1, width=80, depth=None):
    """"""
    printer = PrettyPrinter(
        stream=stream, indent=indent, width=width, depth=depth)
    printer.pprint(object)
567798
def print_all(self, cls, data):
        
        javabridge.call(
            self.jobject, "print", "(Lweka/classifiers/Classifier;Lweka/core/Instances;)V",
            cls.jobject, data.jobject)
706955
def script_repr(self,imports=[],prefix="    "):
        
        return self.pprint(imports,prefix,unknown_value='',qualify=True,
                           separator="\n")
429444
def debug(context):
    

    from pprint import pformat
    output = [pformat(val) for val in context]
    output.append('\n\n')
    output.append(pformat(sys.modules))
    return ''.join(output)
1210875
def pprint_value(self, value):
        
        own_type = type(value) if self.type is None else self.type
        formatter = (self.value_format if self.value_format
                     else self.type_formatters.get(own_type))
        if formatter:
            if callable(formatter):
                return formatter(value)
            elif isinstance(formatter, basestring):
                if isinstance(value, (dt.datetime, dt.date)):
                    return value.strftime(formatter)
                elif isinstance(value, np.datetime64):
                    return util.dt64_to_dt(value).strftime(formatter)
                elif re.findall(r"\{(\w+)\}", formatter):
                    return formatter.format(value)
                else:
                    return formatter % value
        return unicode(bytes_to_unicode(value))
1332795
private Object createInstance(Class pClass, Object pParam) {
    Object value;

    try {

      // Create param and argument arrays
      Class[]  param = { pParam.getClass() };
      Object[] arg   = { pParam };

      // Get constructor
      Constructor constructor = pClass.getDeclaredConstructor(param);

      // Invoke and create instance
      value = constructor.newInstance(arg);
    } catch (Exception e) {
      return null;
    }
    return value;
  }
567491
def pprint(self):
        
        ips = ', '.join(ip for ip in self.ips if ip)
        return """%s
connection IP: %s
IPs:    %s
instance id:   %s
instance flavor: %s""" % (self.name, self.preferred_ip, ips,
                          self.instance_id, self.flavor)
273951
def _print_stream_parameters(self, values):
        """"""
        cprint("{0}".format(*values), "magenta", attrs=["bold"])
        print("{4}".format(*values))
        cprint("  available formats:   {1}".format(*values), "blue")
        cprint("  mandatory selectors: {2}".format(*values), "red")
        cprint("  optional selectors:  {3}".format(*values), "green")
        print()
854576
def printableType(val, name=None, parent=None):
    
    import numpy as np
    if parent is not None and hasattr(parent, 'customPrintableType'):
        # Hack for non - trivial preference types
        _typestr = parent.customPrintableType(name)
        if _typestr is not None:
            return _typestr
    if isinstance(val, np.ndarray):
        info = npArrInfo(val)
        _typestr = info.dtypestr
    elif isinstance(val, object):
        _typestr = val.__class__.__name__
    else:
        _typestr = str(type(val))
        _typestr = _typestr.replace('type', '')
        _typestr = re.sub('[\'><]', '', _typestr)
        _typestr = re.sub('  *', ' ', _typestr)
        _typestr = _typestr.strip()
    return _typestr
716237
protected static void dumpInstance (
        PrintStream out, Object object, boolean includeToString, String indent)
    {
        // summarize the current object
        summarizeObject(out, object, includeToString, indent);
        // increment the indentation level
        indent += " ";
        // summarize the object's fields
        Field[] fields = object.getClass().getDeclaredFields();
        for (int i = 0; i < fields.length; i++) {
            try {
                Object field = fields[i].get(object);
                dumpInstance(out, field, includeToString, indent);
            } catch (Exception e) {
                out.println(indent + "*** unable to fetch field " +
                            "[field=" + fields[i] + ", error=" + e + "]");
            }
        }
    }