preference: m, f (mobile, full)
429967
def _view_url(preference)
      uri = URI(request.url)
      query = Rack::Utils.parse_nested_query(uri.query)
      query["prefer"] = preference
      uri.query = query.to_param
      uri.to_s
    end
903628
def assign(self, pm):
        """"""
        if isinstance(pm, QPixmap):
            self._pm = pm
        else:  # assume xpm string list to be decoded on-demand
            self._xpmstr = pm
            self._pm = None
        self._icon = None
1299417
def triple_density?
      (screen_size == Deliver::AppScreenshot::ScreenSize::IOS_55 || screen_size == Deliver::AppScreenshot::ScreenSize::IOS_58 || screen_size == Deliver::AppScreenshot::ScreenSize::IOS_65)
    end
394987
def _M(self, k, t, tips=None, gaps=None):
        """"""
        if self._distributionmodel:
            return self.model.M(k, t, tips, gaps)
        else:
            return self.model.M(t, tips, gaps)
843104
public static function mobile()
    {
        $agent = strtolower(user::agent());
        return strpos($agent, 'mobile') || strpos($agent, 'android') || strpos($agent, 'iphone');
    }
966056
def preferred_format(incomplete_format, preferred_formats):
    """"""
    incomplete_format = long_form_one_format(incomplete_format)
    if 'format_name' in incomplete_format:
        return incomplete_format

    for fmt in long_form_multiple_formats(preferred_formats):
        if ((incomplete_format['extension'] == fmt['extension'] or (
                fmt['extension'] == '.auto' and
                incomplete_format['extension'] not in ['.md', '.Rmd', '.ipynb'])) and
                incomplete_format.get('suffix') == fmt.get('suffix', incomplete_format.get('suffix')) and
                incomplete_format.get('prefix') == fmt.get('prefix', incomplete_format.get('prefix'))):
            fmt.update(incomplete_format)
            return fmt

    return incomplete_format
317808
def crossover(m, f):
    """"""
    i = random.randint(0, len(m.code))
    j = random.randint(0, len(f.code))
    return m.code[:i] + f.code[j:]
874831
function MobileCommons(user, password) {
  if (!(this instanceof MobileCommons)) return new MobileCommons(user, password);
  this.auth = {
    user: user,
    password: password
  }
  this.api_endpoint = 'https://secure.mcommons.com/api/';
}
290834
private void fillM( Point2D_F64 x1 , Point2D_F64 x2 , Point2D_F64 x3 ) {
		M.data[0] = x1.x; M.data[1] = x1.y; M.data[2] = 1;
		M.data[3] = x2.x; M.data[4] = x2.y; M.data[5] = 1;
		M.data[6] = x3.x; M.data[7] = x3.y; M.data[8] = 1;
	}
882173
function getFullTheme(req, res, next) {
  req.getFullTheme = true;

  getTheme(req, res, next);
}
1059114
def compatible(self, a, b):
        """"""
        return len(set([a] + self.descendants(a))
                   .intersection([b] + self.descendants(b))) > 0
1330314
function(m){
				var l = m.getFaces().length;
				for(var i=0;i<l;i++){
					var f = m.getFaces()[i];
					this.addFace(f.a,f.b,f.c);
				}
				return this;
			}
63810
function (mQueryOptions, oType) {
			if (oType && oType.$Key) {
				_Helper.addToSelect(mQueryOptions, oType.$Key.map(function (vKey) {
					if (typeof vKey === "object") {
						return vKey[Object.keys(vKey)[0]];
					}
					return vKey;
				}));
			}
		}
186916
def might_prefer(self, **items):
        ''''''
        self._overrides = dict((k, v) for (k, v) in items.items() if v is not None)
631668
def request_phone(cls, text, *,
                      resize=None, single_use=None, selective=None):
        
        return cls(types.KeyboardButtonRequestPhone(text),
                   resize=resize, single_use=single_use, selective=selective)
247272
function (mml) {
      if (this.SplitAttribute(mml,"children").length === 1) {
        var child = (mml.data.length === 1 && mml.data[0].inferred ? mml.data[0] : mml);
        if (child.data[0] && child.data[0].collapsible) {
          //
          //  Move menclose into the maction element
          //
          var maction = child.data[0];
          child.SetData(0,maction.data[1]);
          maction.SetData(1,mml);
          mml = maction;
        }
      }
      return mml;
    }
752131
def _maybe_add_read_preference(spec, read_preference):
    """"""
    mode = read_preference.mode
    tag_sets = read_preference.tag_sets
    max_staleness = read_preference.max_staleness
    # Only add $readPreference if it's something other than primary to avoid
    # problems with mongos versions that don't support read preferences. Also,
    # for maximum backwards compatibility, don't add $readPreference for
    # secondaryPreferred unless tags or maxStalenessSeconds are in use (setting
    # the slaveOkay bit has the same effect).
    if mode and (
        mode != ReadPreference.SECONDARY_PREFERRED.mode
        or tag_sets != [{}]
        or max_staleness != -1):

        if "$query" not in spec:
            spec = SON([("$query", spec)])
        spec["$readPreference"] = read_preference.document
    return spec