gets a shallow copy of the argument
189135
function copy(obj) {
  if (obj == null) {
    return obj;
  }

  if (array(obj)) {
    return obj.slice();
  } else if (plainObject(obj)) {
    return clone(obj);
  } else {
    return obj;
  }
}
777128
def format_argument(self, arg):
        """"""
        if isinstance(arg, float):
            return repr(arg)
        elif isinstance(arg, bool):
            return str(int(arg))
        else:
            try:
                return str(arg)
            except UnicodeEncodeError:
                # unicode characters will break the str cast, so
                # try to encode to ascii and replace the offending characters
                # with a '?' character
                logger.error("Error casting message argument to str! "
                             "Trying to encode argument to ascii.")
                if not isinstance(arg, unicode):
                    arg = arg.decode('utf-8')
                return arg.encode('ascii', 'replace')
1250009
def __get_arg(cls, kwds, kwd):
    """"""
    alt_kwd = '_' + kwd
    if alt_kwd in kwds:
      return kwds.pop(alt_kwd)
    if kwd in kwds:
      obj = getattr(cls, kwd, None)
      if not isinstance(obj, Property) or isinstance(obj, ModelKey):
        return kwds.pop(kwd)
    return None
640104
def find_arg(self, name):
        """"""
        name = self.normalize_name(name)
        return self.args.get(name)
1049660
def method_missing(name, *args)
      copy = self.dup
      copy.instance_eval { @args << [name, *(args.collect { |a| a.to_s })] }
      copy
    end
465238
def copy(self):
        """"""
        result = Scalar(self.size, self.deriv)
        result.v = self.v
        if self.deriv > 0: result.d[:] = self.d[:]
        if self.deriv > 1: result.dd[:] = self.dd[:]
        return result
861008
function raw($arg) {
        $fw=Base::instance();
        return $fw->recursive($arg,
            function($val) use($fw) {
                return is_string($val)?$fw->decode($val):$val;
            }
        );
    }
1035149
public Object shallowCopy() {
        Object copy = null;
        try {
            copy = super.clone();
        } catch (Exception e) {
            e.printStackTrace(System.err);
        }
        return copy;
    }
934981
def copy(self):
        
        parser_copy = self.__class__(self.argument_class, self.namespace_class)
        parser_copy.args = deepcopy(self.args)
        parser_copy.trim = self.trim
        parser_copy.bundle_errors = self.bundle_errors
        return parser_copy
33757
function copyArguments(args) {
    var copy = [];
    for (var i = 0; i < args.length; i++) {
        copy.push(args[i]);
    }
    return copy;
}
1357655
function(fun) {
      var fixArgs = _.rest(arguments);

      var f = function() {
        var args = fixArgs.slice();
        var arg = 0;

        for ( var i = 0; i < (args.length || arg < arguments.length); i++ ) {
          if ( args[i] === _ ) {
            args[i] = arguments[arg++];
          }
        }

        return fun.apply(null, args);
      };

      f._original = fun;

      return f;
    }
1179882
function(input, shallow, output) 
	{
		if (shallow && conbo.every(input, conbo.isArray)) 
		{
			return concat.apply(output, input);
		}
		
		forEach(input, function(value) 
		{
			if (conbo.isArray(value) || conbo.isArguments(value)) 
			{
				shallow ? push.apply(output, value) : flatten(value, shallow, output);
			}
			else 
			{
				output.push(value);
			}
		});
		
		return output;
	}
1318361
function shallowCopy(src, dst) {
  if (isArray(src)) {
    dst = dst || [];

    for (var i = 0, ii = src.length; i < ii; i++) {
      dst[i] = src[i];
    }
  } else if (isObject(src)) {
    dst = dst || {};

    for (var key in src) {
      if (!(key.charAt(0) === '$' && key.charAt(1) === '$')) {
        dst[key] = src[key];
      }
    }
  }

  return dst || src;
}
171013
def copy(self):
        """"""
        return Poly(self.A.copy(), self.dim, self.shape,
            self.dtype)
420840
def copy(self, *args, **kwargs):
        """"""

        for slot in self.__slots__:
            attr = getattr(self, slot)
            if slot[0] == '_':  # convert protected attribute name to public
                slot = slot[1:]
            if slot not in kwargs:
                kwargs[slot] = attr

        result = type(self)(*args, **kwargs)

        return result
309674
function copy(object) {
  // a quick copy
  var copy = {};
  for (var i in object) {
    copy[i] = object[i];
  }
  return copy;
}
1364584
def reprsig(fun, name=None, method=False):
    """"""
    args, varargs, keywords, defs, kwargs = [], [], None, [], {}
    argspec = fun
    if callable(fun):
        name = fun.__name__ if name is None else name
        argspec = getargspec(fun)
    try:
        args = argspec[0]
        varargs = argspec[1]
        keywords = argspec[2]
        defs = argspec[3]
    except IndexError:
        pass
    if defs:
        args, kwkeys = args[:-len(defs)], args[-len(defs):]
        kwargs = dict(zip(kwkeys, defs))
    if varargs:
        args.append('*' + varargs)
    if method:
        args.insert(0, 'self')
    return reprcall(name, map(str, args), kwargs, keywords,
                    argfilter=str)