Add a certain number of resources to the trade from getter->giver
        :param terrain: resource type, models.Terrain
        :param num: number to add, int
        :return: None
19097
def get(self, terrain, num=1):
        
        for _ in range(num):
            logging.debug('terrain={}'.format(terrain))
            self._get.append(terrain)
544522
def visit_Num(self, node):
        
        if isinstance(node.n, int):
            return self.add(node, Interval(node.n, node.n))
        return UNKNOWN_RANGE
1170857
def add(self, item):
        
        def result_fnc(f):
            if f.result():
                return True
            raise Full("Queue is full!")

        return self.offer(item).continue_with(result_fnc)
855509
def addValue(self, _, value):
    """"""
    if value is not None:
      try:
        self._count += self._dataFormat.getCount(value)
        self._total += self._dataFormat.getValue(value) * self._dataFormat.getCount(value)
      except TypeError:
        self._count += 1
        self._total += value
1195236
def _add_resources(data, runtime):
    
    if "config" not in data:
        data["config"] = {}
    # Convert input resources, which may be a JSON string
    resources = data.get("resources", {}) or {}
    if isinstance(resources, six.string_types) and resources.startswith(("{", "[")):
        resources = json.loads(resources)
        data["resources"] = resources
    assert isinstance(resources, dict), (resources, data)
    data["config"]["resources"] = resources
    # Add in memory and core usage from CWL
    memory = int(float(runtime["ram"]) / float(runtime["cores"]))
    data["config"]["resources"].update({"default": {"cores": int(runtime["cores"]),
                                                    "memory": "%sM" % memory,
                                                    "jvm_opts": ["-Xms%sm" % min(1000, memory // 2),
                                                                    "-Xmx%sm" % memory]}})
    data["config"]["algorithm"]["num_cores"] = int(runtime["cores"])
    return data
705976
public void addNextValue(Object val) {
    if (this.numItems <= this.maxNumItems) {
      uniqItems.put(val.toString(), "1");
      this.numItems = this.uniqItems.size();
    }
  }
1091573
public OptionalSyntax take(int num) {
		getMessage().setMaxresults(num);
		QueryMessage mess = getMessage();
		return new OptionalSyntax(mess);
	}
1095548
def add(self, num):
        
        try:
            val = self.value() + num
        except:
            val = num
        self.set(max(0, val))
912284
def add(self, value):
        ''''''
        return self.cache.update((self.value_pickler.dumps(value),))
562548
def add(self, item_numid, collect_type, shared, session):
        ''''''
        request = TOPRequest('taobao.favorite.add')
        request['item_numid'] = item_numid
        request['collect_type'] = collect_type
        request['shared'] = shared
        self.create(self.execute(request, session))
        return self.result
340335
def num_inputs(self):
        

        num = 0

        for walker, _ in self.inputs:
            if not isinstance(walker, InvalidStreamWalker):
                num += 1

        return num
1146890
public static ns add(nitro_service client, ns resource) throws Exception
	{
		resource.validate("add");
		return ((ns[]) resource.perform_operation(client, "add"))[0];
	}
1356273
public void setNumber(int index, Number value)
   {
      set(selectField(ResourceFieldLists.CUSTOM_NUMBER, index), value);
   }
139985
def add_invites(cls, amount):
        
        for user in get_user_model().objects.all():
            cls.add_invites_to_user(user, amount)
722108
public MapBuilder addNumber(String fieldName, boolean include, Supplier<Number> supplier) {
        if (include) {
            Number value = supplier.get();
            if (value != null) {
                map.put(getFieldName(fieldName), value);
            }
        }
        return this;
    }
171538
function addNum(arr, num, index = 0) {
  if (arr[index] == undefined) arr[index] = 0;
  arr[index] += num;
}
113369
def get_shard_by_num(self, shard_num):
        
        if shard_num < 0 or shard_num >= self.num_shards():
            raise ValueError("requested invalid shard# {0}".format(shard_num))

        return self._shards[shard_num]