This function adds two number.

    :param one: first number to add
    :param two: second number to add
    :rtype: int
558292
def add(one, two=4, three=False):
    ''' 
    '''
    s = str(int(one) + int(two))

    logging.debug('logging sum from hello.py:' + s)
    print 'printing sum from hello.py:', s

    return s
703391
def _internal_add(self, other):
        
        if hasattr(other, "datatype"):
            if other.datatype == self.datatype:
                rtn_val = self.value + other.value
            else:
                rtn_val = self.value + int(other.value)
        else:
            rtn_val = self.value + other
        return XsdInteger(rtn_val)
304328
def AddValue(self, name, number, aliases=None, description=None):
    
    if name in self.values_per_name:
      raise KeyError('Value with name: {0:s} already exists.'.format(name))

    if number in self.values_per_number:
      raise KeyError('Value with number: {0!s} already exists.'.format(number))

    for alias in aliases or []:
      if alias in self.values_per_alias:
        raise KeyError('Value with alias: {0:s} already exists.'.format(alias))

    enumeration_value = EnumerationValue(
        name, number, aliases=aliases, description=description)

    self.values.append(enumeration_value)
    self.values_per_name[name] = enumeration_value
    self.values_per_number[number] = enumeration_value

    for alias in aliases or []:
      self.values_per_alias[alias] = enumeration_value
329990
public FloatPoint Add(FloatPoint point1, FloatPoint point2) {
        FloatPoint result = new FloatPoint(point1);
        result.Add(point2);
        return result;
    }
802940
public static function add($num1, $num2)
    {
        if (!static::is($num1) || !static::is($num2)) {
            throw new \InvalidArgumentException("The \$num1 and \$num2 parameters must be numeric.");
        }

        return ($num1 + $num2);
    }
1242685
def two_numbers(
            cls, request,
            operation: (Ptypes.path,
                        String('One of the 4 arithmetic operations.',
                                enum=['add', 'sub', 'mul', 'div'])),
            first: (Ptypes.path,
                    Float('The first operand.')),
            second: (Ptypes.path,
                     Float('The second operand.'))) -> [
            (200, 'Ok', Float),
            (400, 'Wrong number format or invalid operation'),
            (422, 'NaN')]:
        ''''''
        log.info('Performing {} on {} and {}'.format(operation, first, second))
        try:
            first = float(first)
            second = float(second)
        except ValueError:
            Respond(400)
        if operation == 'add':
            Respond(200, first + second)
        elif operation == 'sub':
            Respond(200, first - second)
        elif operation == 'mul':
            Respond(200, first * second)
        elif operation == 'div':
            if second == 0:
                Respond(422)
            Respond(200, first / second)
        else:
            Respond(400)
447412
public static IntPoint Multiply(IntPoint point1, IntPoint point2) {
        IntPoint result = new IntPoint(point1);
        result.Multiply(point2);
        return result;
    }
1018545
def Append(self, other):
        
        orig_len = len(self)
        self.Set(orig_len + len(other))
        ipoint = orig_len
        if hasattr(self, 'SetPointError'):
            for point in other:
                self.SetPoint(ipoint, point.x.value, point.y.value)
                self.SetPointError(
                    ipoint,
                    point.x.error_low, point.x.error_hi,
                    point.y.error_low, point.y.error_hi)
                ipoint += 1
        else:
            for point in other:
                self.SetPoint(ipoint, point.x.value, point.y.value)
                ipoint += 1
912709
def append(self, first, count):
        

        self.__range.append(IdRange(first, count))
1266039
def add(self, a, b):
        
        self.send_add(a, b)
        return self.recv_add()
111101
private static BigDecimal doAdd(final BigDecimal v1, final BigDecimal v2) {
        BigDecimal total = v1;
        if (v1 != null && v2 != null) {
            total = v1.add(v2);
        } else if (v2 != null) {
            total = v2;
        }
        return total;
    }
841263
def add(self, num):
        
        try:
            val = self.value() + num
        except:
            val = num
        self.set(min(self.fmax, max(self.fmin, val)))
1118593
def add_numbers():
    """"""
    a = request.params.get('a', 0, type=int)
    b = request.params.get('b', 0, type=int)
    return json.dumps({'result': a+b})
795928
def _get_value(first, second):
    

    if isinstance(first, list) and isinstance(second, list):
        return list(set(first).union(set(second)))
    elif isinstance(first, dict) and isinstance(second, dict):
        first.update(second)
        return first
    elif first is not None and second is not None and not isinstance(first, type(second)):
        return type(first)(second)
    else:
        return second
1252206
def add(self, num):
        
        self.index = max(0, min(len(self.allowed)-1, self.index+num))
        self.set(self.allowed[self.index])
1174065
def AddPmf(self, other):
        
        pmf = Pmf()
        for v1, p1 in self.Items():
            for v2, p2 in other.Items():
                pmf.Incr(v1 + v2, p1 * p2)
        return pmf
1137686
def add(self, *args, **kwargs):
        
        return self._apply(operator.add, *args, **kwargs)