Write your forwards methods here.
503053
def forwards(self, orm):
        ""
        # Note: Remember to use orm['appname.ModelName'] rather than "from appname.models..."

        User = orm[user_orm_label]

        try:
            user = User.objects.all()[0]

            for article in orm.Article.objects.all():
                article.author = user
                article.save()

        except IndexError:
            pass
430532
def forwards(self, orm):
        ""
        # Note: Don't use "from appname.models import ModelName". 
        # Use orm.ModelName to refer to models in this application,
        # and orm['appname.ModelName'] for models in other applications.
        from account_keeping.models import Invoice
        for invoice in Invoice.objects.all():
            invoice.save()
1084797
def move_forward(self, seconds=None):
        """"""
        self._move(speed=SPEED_MAX, steering=0, seconds=seconds)
955868
def forward_lines(size = 10)

      file   = @file
      result = ""

      while result.scan(/\r\n|\r|\n/).size < size && !file.eof?

        result += file.gets
      end

      result
    end
513902
def forwards(self, orm):
        ""
        orm['samples.Cohort'].objects.filter(autocreated=True, batch__isnull=False).delete()
1130095
def _forward_iterator(self):
        ""
        path = [(self, 0, Bits())]
        while path:
            node, idx, prefix = path.pop()
            if idx==0 and node.value is not None and not node.prune_value:
                yield (self._unpickle_key(prefix), self._unpickle_value(node.value))
            if idx<len(node.children):
                path.append((node, idx+1, prefix))
                link = node.children[idx]
                if not link.pruned:
                    path.append((link.node, 0, prefix + link.prefix))
462997
def forward(self, data_batch, is_train=None, carry_state=True):
        
        # propagate states from the previous iteration
        if carry_state:
            if isinstance(self._next_states, (int, float)):
                self._module.set_states(value=self._next_states)
            else:
                self._module.set_states(states=self._next_states)
        self._module.forward(data_batch, is_train=is_train)
        outputs = self._module.get_outputs(merge_multi_context=False)
        self._next_states = outputs[:-1]
986848
def forwards(apps, schema_editor):
    
    Event = apps.get_model('spectator_events', 'Event')

    for event in Event.objects.all():
        if event.venue is not None:
            event.venue_name = event.venue.name
            event.save()
846244
def forwards(apps, schema_editor):
    
    RecurrenceRule = apps.get_model('icekit_events', 'RecurrenceRule')
    for description, recurrence_rule in RULES:
        RecurrenceRule.objects.get_or_create(
            description=description,
            defaults=dict(recurrence_rule=recurrence_rule),
        )
973262
def def_forward(mappings, *names)
      if mappings.instance_of? Hash
        mappings.each do |method_name, target|
          define_singleton_method method_name do |*args, &block|
            self.config = config.public_send(target, *args, &block)
          end
        end
      else
        def_forward([mappings, *names].map{|name| {name => name}}.inject(:merge))
      end
    end
161305
def forward_list(self):
        '''
        
        '''
        version = self.version()
        if int(version[1]) <= 1 and int(version[2]) <= 0 and int(version[3]) < 31:
            raise EnvironmentError("Low adb version.")
        lines = self.run_cmd("forward", "--list").strip().splitlines()
        return [line.strip().split() for line in lines]
1110992
public static void Forward(double[][] data) {
        double[][] result = new double[data.length][data[0].length];

        for (int m = 0; m < data.length; m++) {
            for (int n = 0; n < data[0].length; n++) {
                double sum = 0;
                for (int i = 0; i < result.length; i++) {
                    for (int k = 0; k < data.length; k++) {
                        sum += data[i][k] * cas(((2.0 * Math.PI) / data.length) * (i * m + k * n));
                    }
                    result[m][n] = (1.0 / data.length) * sum;
                }
            }
        }

        for (int i = 0; i < data.length; i++) {
            for (int j = 0; j < data[0].length; j++) {
                data[i][j] = result[i][j];
            }
        }
    }
1061678
def forwards(self, orm):
        ""
        # Note: Remember to use orm['appname.ModelName'] rather than "from appname.models..."
        for category in orm['document_library.DocumentCategory'].objects.all():
            category.slug = category.documentcategorytitle_set.all()[0].title.lower()
            category.save()
839270
def database_forwards(self, app_label, schema_editor, from_state, to_state):
        """"""
        from resolwe.flow.models.data import DataQuerySet
        # pylint: disable=protected-access

        Data = from_state.apps.get_model('flow', 'Data')  # pylint: disable=invalid-name
        DataQuerySet._delete_chunked(Data.objects.filter(process__slug=self.process))

        Process = from_state.apps.get_model('flow', 'Process')  # pylint: disable=invalid-name
        Process.objects.filter(slug=self.process).delete()
476458
def forwards(self, orm):
        ""
        orm['avocado.DataField'].objects.get_or_create(app_name='samples', model_name='batch', field_name='id',
                defaults=dict(published=True, name='Batch', name_plural='Batches'))
593764
public static void Forward(double[][] data) {
        int rows = data.length;
        int cols = data[0].length;

        double[] row = new double[cols];
        double[] col = new double[rows];

        for (int i = 0; i < rows; i++) {
            for (int j = 0; j < row.length; j++)
                row[j] = data[i][j];

            Forward(row);

            for (int j = 0; j < row.length; j++)
                data[i][j] = row[j];
        }

        for (int j = 0; j < cols; j++) {
            for (int i = 0; i < col.length; i++)
                col[i] = data[i][j];

            Forward(col);

            for (int i = 0; i < col.length; i++)
                data[i][j] = col[i];
        }
    }
28078
def forwards(self, orm):
        ""
        # Note: Don't use "from appname.models import ModelName".
        # Use orm.ModelName to refer to models in this application,
        # and orm['appname.ModelName'] for models in other applications.
        other = orm['assessments.AssessmentCategory'].objects.get(id=7)
        for assessment in orm['assessments.Assessment'].objects.filter(
                assessment_category__isnull=True):
            assessment.assessment_category = other
            assessment.save()