Demotivate someone
161974
def demotivate(channel, rest):
	""
	if rest:
		r = rest.strip()
	else:
		r = channel
	karma.Karma.store.change(r, -1)
	return "you're doing horrible work, %s!" % r
79173
public function demote($username)
    {
        $user = $this->findUserByUsernameOrThrowException($username);
        $user->setSuperAdmin(false);
        $this->userManager->updateUser($user);

        $event = new UserEvent($user, $this->getRequest());
        $this->dispatcher->dispatch(Events::USER_DEMOTED, $event);
    }
352805
def removeIndividual(self, individual):
        
        q = models.Individual.delete().where(
            models.Individual.id == individual.getId())
        q.execute()
792544
function lower (value) {
  if (value === null || value === undefined) {
    return value
  }
  return String.prototype.toLowerCase.call(value)
}
130571
def discard(self, *args):
        '''
        
        '''
        return Plan(reduce(lambda m,k: m.discard(k), args, self.nodes))
1205230
def kick_user(self, jid):
        """"""
        for member in filter(lambda m: m['JID'] == jid, self.params['MEMBERS']):
            member['STATUS'] = 'KICKED'
            self.send_message('You have been kicked from %s' % (self.name,), member)

            self.client.sendPresence(jid=member['JID'], typ='unsubscribed')
            self.client.sendPresence(jid=member['JID'], typ='unsubscribe')
            self.broadcast('kicking %s from the room' % (jid,))
442584
def destroy(self, request, pk=None):
        ''''''
        user = self.get_object()
        user.is_active = False
        user.save()
        return Response(status=status.HTTP_204_NO_CONTENT)
161053
def demote
      # remove the administrator flag from the selected user.
      if @user.system_admin?
        if @user.update(system_admin: false)
          flash[:success] = "User #{@user} has been demoted from administrator."
        else
          flash[:danger] = "Failed to demote user #{@user}."
        end
      else
        flash[:warning] = "User #{@user} is not an administrator."
        unless inline_request?
          redirect_to users_path and return
        end
      end

      if inline_request?
        render 'show', formats: [ :json ]
      else
        redirect_to users_path
      end

    end
73643
function reverse() {
    var upperIndex,
        value,
        index = -1,
        object = Object(this),
        length = object.length >>> 0,
        middle = floor(length / 2);

    if (length > 1) {
      while (++index < middle) {
        upperIndex = length - index - 1;
        value = upperIndex in object ? object[upperIndex] : uid;
        if (index in object) {
          object[upperIndex] = object[index];
        } else {
          delete object[upperIndex];
        }
        if (value != uid) {
          object[index] = value;
        } else {
          delete object[index];
        }
      }
    }
    return object;
  }
162554
def cmd(send, msg, args):
    
    if not msg:
        send("kill who?")
        return
    if msg.lower() == args['botnick'].lower():
        send('%s is not feeling suicidal right now.' % msg)
    else:
        send('Die, %s!' % msg)
278145
def OnDestroy(self, event):
        """"""
        # deregister observers
        if hasattr(self, 'cardmonitor'):
            self.cardmonitor.deleteObserver(self.cardtreecardobserver)
        if hasattr(self, 'readermonitor'):
            self.readermonitor.deleteObserver(self.readertreereaderobserver)
            self.cardmonitor.deleteObserver(self.readertreecardobserver)
        event.Skip()
151457
function performRemove() {
        UserService.remove(vm.user)
          .then(deleteUserSuccess)
          .catch(deleteUserCatch);

        function deleteUserSuccess() {
          Toast.show({type: 'success', text: 'User ' + vm.displayName + ' deleted'});
          vm.showList();
        }

        function deleteUserCatch(err) {
          Toast.show({
            type: 'warn',
            text: 'Error while deleting user ' + vm.displayName,
            link: {state: $state.$current, params: $stateParams}
          });

          if (form && err) {
            form.setResponseErrors(err, vm.errors);
          }
        }
      }
721404
function removeThis()
    {
        $exportItems = $this->fetchItems();

        $db = eZDB::instance();
        $db->begin();
        foreach ( $exportItems as $item )
        {
            $item->remove();
        }
        $this->remove();
        $db->commit();
    }
213268
def _demote_all(self):
        
        # only do the calculations if the demoted list is empty
        if len(self.demoted) == 0:
            pd = self.pixeldict
            for d in range(1, self.maxdepth):
                for p in pd[d]:
                    pd[d+1].update(set((4*p, 4*p+1, 4*p+2, 4*p+3)))
                pd[d] = set()  # clear the pixels from this level
            self.demoted = pd[d+1]
        return
361270
protected void demoteSeverity(ValidationPlanResult planResult,
			Severity maxSeverity) {
		if (Severity.ERROR.equals(maxSeverity)) {
			return;
		}
		for (ValidationMessage<?> message : planResult.getMessages()) {
			switch (message.getSeverity()) {
			case ERROR:
				message.setSeverity(maxSeverity);
				break;
			case WARNING:
				message.setSeverity(maxSeverity);
				break;
			}
		}
	}
963469
def remove(self, x):
        """"""

        def _remove(x):
            found = self.first(x)
            if found is not None:
                self._args.pop(found)

        if _is_collection(x):
            for item in x:
                _remove(x)
        else:
            _remove(x)
53933
def _propagate(self, x, influences, **kwargs):
        """"""
        activation, difference_x = self.forward(x)
        update = self.backward(difference_x, influences, activation)
        # If batch size is 1 we can leave out the call to mean.
        if update.shape[0] == 1:
            self.weights += update[0]
        else:
            self.weights += update.mean(0)

        return activation