raw objects default to equals {first_name: 'Fred', last_name = 'Flintstone'} -> [equals('first_name', 'Fred'), equals('last_name', 'Flintstone')]
496402
function objToEquals(obj) {
    var expressions = [];
    for (var col in obj) {
      expressions.push(sql.equal(col, obj[col]));
    }
    return expressions;
  }
602385
function areThingsEqual (a, b) {
  var aKeys , bKeys , i;

  // Strings, booleans, numbers, null
  if (a === null || typeof a === 'string' || typeof a === 'boolean' || typeof a === 'number' ||
      b === null || typeof b === 'string' || typeof b === 'boolean' || typeof b === 'number') { return a === b; }

  // Dates
  if (util.isDate(a) || util.isDate(b)) { return util.isDate(a) && util.isDate(b) && a.getTime() === b.getTime(); }

  // Arrays (no match since arrays are used as a $in)
  // undefined (no match since they mean field doesn't exist and can't be serialized)
  if ((!(util.isArray(a) && util.isArray(b)) && (util.isArray(a) || util.isArray(b))) || a === undefined || b === undefined) { return false; }

  // General objects (check for deep equality)
  // a and b should be objects at this point
  try {
    aKeys = Object.keys(a);
    bKeys = Object.keys(b);
  } catch (e) {
    return false;
  }

  if (aKeys.length !== bKeys.length) { return false; }
  for (i = 0; i < aKeys.length; i += 1) {
    if (bKeys.indexOf(aKeys[i]) === -1) { return false; }
    if (!areThingsEqual(a[aKeys[i]], b[aKeys[i]])) { return false; }
  }
  return true;
}
309616
def _parse_syntax(self, raw):
        
        raw = str(raw)  # treat the value as a string regardless of its actual data type
        has_syntax = re.findall(r'<(\^)?(fk__)?(\w+)?([0-9]*[.]?[0-9]+?)?(\:)?([0-9]*[.]?[0-9]+?)?(\:)?([0-9]*[.]?[0-9]+?)?>', raw, flags=re.DOTALL)

        if has_syntax:
            fake_val = re.sub(
                r'\'?\"?<(\^)?(fk__)?(\w+)?([0-9]*[.]?[0-9]+?)?(\:)?([0-9]*[.]?[0-9]+?)?(\:)?([0-9]*[.]?[0-9]+?)?>\'?\"?',
                self._replace_faker_attr,
                raw,
                flags=re.DOTALL
            )
            fake_val = fake_val.replace("'", '"')
            try:
                fake_val = json.loads(fake_val)
            except:
                pass
            return fake_val
        else:
            return raw
1198957
def raw(self, raw):
        
        if raw is None:
            raise ValueError("Invalid value for `raw`, must not be `None`")
        if raw is not None and not re.search('^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', raw):
            raise ValueError("Invalid value for `raw`, must be a follow pattern or equal to `/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/`")

        self._raw = raw
199129
def to_raw(self, value, context=None):
        """"""
        if value is None:
            return None
        res = {}
        value = value.copy()
        errors = []
        for field in list(set(value) & set(self._fields)):
            schema = self._fields.get(field)
            name = schema.get_attr('name', field)
            try:
                res[name] = \
                    schema.to_raw(value.pop(field), context=context)
            except exceptions.ValidationErrors as ex:
                self._update_errors_by_exception(errors, ex, name)

        self._raise_exception_when_errors(errors, value)
        res.update(value)
        return res
62724
def raw_default(context)
      value = options.fetch(:default)
      return value unless value.is_a?(Proc)

      case value.arity
      when 1 then context.instance_exec(self, &value)
      else context.instance_exec(&value)
      end
    end
647288
function( name, actual, expected ) {
		var self = this, passed = true, extra = '';

		try {
			self._objectMatch( actual, expected );
		}
		catch ( e ) {
			passed = false;
			extra = e;

			if ( ! munit.isString( e ) ) {
				throw e;
			}
		}
		
		return self.ok( name, passed, self.deepEqual, extra );
	}
1021479
def process_raw(self, raw: str) -> None:
        
        raw_params = dict(group.split('=', 1) for group in raw.splitlines())

        super().process_raw(raw_params)
949255
def from_raw_data(cls, item_raw):
        
        deserialized = {}
        for name, value in item_raw.items():
            attr = getattr(cls, name, None)
            if attr is None:
                continue
            deserialized[name] = attr.decode(value)
        return cls(**deserialized)
212480
def _repr(obj):
    """"""
    vals = ", ".join("{}={!r}".format(
        name, getattr(obj, name)) for name in obj._attribs)
    if vals:
        t = "{}(name={}, {})".format(obj.__class__.__name__, obj.name, vals)
    else:
        t = "{}(name={})".format(obj.__class__.__name__, obj.name)
    return t
956937
def equal(actual, expected):
    '''
    
    '''
    is_passing = (actual == expected)

    types_to_diff = (str, dict, list, tuple)
    if not is_passing and isinstance(expected, types_to_diff) and isinstance(actual, types_to_diff):
        readable_diff = difflib.unified_diff(pformat(expected).split('\n'),
                                             pformat(actual).split('\n'), n=99)
        description = '\n'.join(['equal:'] + list(readable_diff))
    else:
        description = "equal: expect {} == {}".format(actual, expected)
    outcome = (is_passing, description)
    return outcome
625688
def raw_repr(obj):
    ''''''
    if isproxy(obj):
        return '<%s with prime_id=%d>' % (obj.__class__.__name__, obj.prime_id)
    else:
        return repr(obj)
381189
def to_primitive(self, value, context=None):
        

        if context and context.get('rel_ids'):
            return value.rid
        else:
            return {'rtype': value.rtype, 'rid': value.rid}
802297
def fullqualname_py2(obj):
    """"""

    if type(obj).__name__ == 'builtin_function_or_method':

        return _fullqualname_builtin_py2(obj)

    elif type(obj).__name__ == 'function':

        return obj.__module__ + '.' + obj.__name__

    elif type(obj).__name__ in ['member_descriptor', 'method_descriptor',
                                'wrapper_descriptor']:

        return (obj.__objclass__.__module__ + '.' +
                obj.__objclass__.__name__ + '.' +
                obj.__name__)

    elif type(obj).__name__ == 'instancemethod':

        return _fullqualname_method_py2(obj)

    elif type(obj).__name__ == 'method-wrapper':

        return fullqualname_py2(obj.__self__) + '.' + obj.__name__

    elif type(obj).__name__ == 'module':

        return obj.__name__

    elif inspect.isclass(obj):

        return obj.__module__ + '.' + obj.__name__

    return obj.__class__.__module__ + '.' + obj.__class__.__name__
1295311
def raw(self, raw):
        
        if raw is None:
            raise ValueError("Invalid value for `raw`, must not be `None`")  # noqa: E501
        if raw is not None and not re.search(r'^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', raw):  # noqa: E501
            raise ValueError(r"Invalid value for `raw`, must be a follow pattern or equal to `/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/`")  # noqa: E501

        self._raw = raw
310938
def isqref(object):
    
    return (
        isinstance(object, tuple) and
        len(object) == 2 and
        isinstance(object[0], basestring) and
        isinstance(object[1], basestring))
1258200
def getEncodableAttributes(self, obj, **kwargs):
        
        attrs = pyamf.ClassAlias.getEncodableAttributes(self, obj, **kwargs)

        if not self.exclude_sa_key:
            # primary_key_from_instance actually changes obj.__dict__ if
            # primary key properties do not already exist in obj.__dict__
            attrs[self.KEY_ATTR] = self.mapper.primary_key_from_instance(obj)

        if not self.exclude_sa_lazy:
            lazy_attrs = []

            for attr in self.properties:
                if attr not in obj.__dict__:
                    lazy_attrs.append(attr)

            attrs[self.LAZY_ATTR] = lazy_attrs

        return attrs