insert *values* at date *dte*.
541340
def insert(self, dte, values):
        ''''''
        if len(values):
            dte = self.dateconvert(dte)
            if not self:
                self._date = np.array([dte])
                self._data = np.array([values])
            else:
                # search for the date
                index = self._skl.rank(dte)
                if index < 0:
                    # date not available
                    N = len(self._data)
                    index = -1-index
                    self._date.resize((N+1,))
                    self._data.resize((N+1, self.count()))
                    if index < N:
                        self._date[index+1:] = self._date[index:-1]
                        self._data[index+1:] = self._data[index:-1]
                self._date[index] = dte
                self._data[index] = values
            self._skl.insert(dte)
654257
def insert(self, index, value):
        """"""
        self.check(value)
        self._user_list.insert(index, value)
513504
def insert(table, values=(), **kwargs):
    """"""
    values = dict(values, **kwargs).items()
    sql, args = makeSQL("INSERT", table, values=values)
    return execute(sql, args).lastrowid
15105
def _getFromDate(l, date):
    '''
    
    '''
    try:
        date = _toDate(date)
        i = _insertDateIndex(date, l) - 1
        if i == -1:
            return l[0]
        return l[i]
    except (ValueError, TypeError):
        # ValueError: date invalid / TypeError: date = None
        return l[0]
666302
def _batch_insert(self, inserts, intervals, **kwargs):
    '''
    
    '''
    for timestamp,names in inserts.iteritems():
      for name,values in names.iteritems():
        for value in values:
          self._insert( name, value, timestamp, intervals, **kwargs )
889582
def _before_insert(mapper, connection, target):
    """"""
    if target.position is None:
        func = sa.sql.func
        stmt = sa.select([func.coalesce(func.max(mapper.mapped_table.c.position), -1)])
        target.position = connection.execute(stmt).scalar() + 1
933191
def insert_data(self, node, data, start, end):
        """"""
        for item in data:
            self.recursive_insert(node, [item[0], item[1]], item[-1], start, end)
1309558
def _add_updated_at_column(self, values):
        
        if not self._model.uses_timestamps():
            return values

        column = self._model.get_updated_at_column()

        if "updated_at" not in values:
            values.update({column: self._model.fresh_timestamp_string()})

        return values
1199745
def prepare_date(data, schema):
    """"""
    if isinstance(data, datetime.date):
        return data.toordinal() - DAYS_SHIFT
    else:
        return data
929633
void insert_data(AttributeValue attr_val, TimeVal t)
	{
		if (size()>=max_elt)
			remove(0);
		add(new RingElt(attr_val, t));
		/*
		for (int i=0 ; i<size() ; i++)
			System.out.println(elementAt(i).toString());
		*/
	}
239955
def _setInsertFromTable(self, value):
        """"""
        self._insertFromTable = value
        if value:
            self.insertElement = self.insertElementTable
        else:
            self.insertElement = self.insertElementNormal
1089766
def insert_statement(table, columns, values):
    """"""
    if not all(isinstance(r, (list, set, tuple)) for r in values):
        values = [[r] for r in values]
    rows = []
    for row in values:
        new_row = []
        for col in row:
            if col is None:
                new_col = 'NULL'
            elif isinstance(col, (int, float, Decimal)):
                new_col = str(MySQLConverterBase().to_mysql(col))
            else:
                string = str(MySQLConverterBase().to_mysql(col))
                if "'" in string:
                    new_col = '"' + string + '"'
                else:
                    new_col = "'" + string + "'"
            new_row.append(new_col)
        rows.append(', '.join(new_row))
    vals = '(' + '),\n\t('.join(rows) + ')'
    statement = "INSERT INTO\n\t{0} ({1}) \nVALUES\n\t{2}".format(wrap(table), cols_str(columns), vals)
    return statement
183248
def _type_insert(self, handle, key, value):
    '''
    
    '''
    if value!=0:
      if isinstance(value,float):
        handle.incrbyfloat(key, value)
      else:
        handle.incr(key,value)
286647
def insert(self, value):
        """"""
        if not self.payload or value == self.payload:
            self.payload = value
        else:
            if value <= self.payload:
                if self.left:
                    self.left.insert(value)
                else:
                    self.left = BinaryTreeNode(value)
            else:
                if self.right:
                    self.right.insert(value)
                else:
                    self.right = BinaryTreeNode(value)
1304268
private final void insert(T t) {
        buffer[putIndex] = t;

        if (++putIndex >= buffer.length) {
            putIndex = 0;
        }
    }
397187
async def dateadd(request, value, addend, unit):
    """"""
    value = value or dt.datetime.utcnow()
    if unit == "minutes":
        delta = dt.timedelta(minutes=addend)
    else:
        delta = dt.timedelta(days=addend)
    result = value + delta
    return json_response({"result": result.isoformat()})
884451
def set_data(self, *args):
        """"""
        db = self.begining.get_data() or formats.DATE_DEFAULT
        df = self.end.get_data() or formats.DATE_DEFAULT
        jours = max((df - db).days + 1, 0)
        self.setText(str(jours) + (jours >= 2 and " jours" or " jour"))