<commit_before>import React from 'react';
import {Dimensions, StyleSheet, View} from 'react-native';
import {NavigationMotion, spring} from 'navigation-react-native';

const getStyle = ({x, y, w, h, width}, show, translate = false) => ({
  x: spring(x || 0, {stiffness: 250}),
  y: spring(y || 0, {stiffness: 250}),
  w: spring(w || 0, {stiffness: 250}),
  h: spring(h || 0, {stiffness: 250}),
  show: spring(show, {stiffness: 250}),
  translate: spring(0, {stiffness: 250}),
});

export default ({stateNavigator}) => (
  <NavigationMotion
    startStateKey="grid"
    unmountedStyle={(state, data, sceneData) => {
      if (sceneData && sceneData.fromX)
        data = {...data, x: sceneData.fromX, y: sceneData.fromY, w: sceneData.fromW, h: sceneData.fromH};
      return getStyle(data, 0, true);
    }}
    mountedStyle={(state, data, sceneData) => getStyle({...data, ...sceneData}, 1)}
    crumbStyle={getStyle({}, 1)}
    style={{flex: 1}}
    stateNavigator={stateNavigator}>
    {({show, x, y, w, h, translate}, scene, url, state, {color}) => (
      <View
        key={url}
        style={[
          styles.scene,
          {transform: [
            {translateX: Dimensions.get('window').width * translate},
          ]},
        ]}>
        <View
          style={{
            position: 'absolute',
            left: x,
            top: y,
            width: w,
            height: h,
            backgroundColor: color,
          }}>
        </View>
        <View
          style={{
            flex: 1,
            opacity: Math.ceil(translate) || Math.floor(show),
          }}>
          {scene}
        </View>
      </View>
    )}
  </NavigationMotion>
);

const styles = StyleSheet.create({
  scene: {
    position: 'absolute',<commit_msg>Removed redundant translation<commit_after>import React from 'react';
import {Dimensions, StyleSheet, View} from 'react-native';
import {NavigationMotion, spring} from 'navigation-react-native';

const getStyle = ({x, y, w, h, width}, show) => ({
  x: spring(x || 0, {stiffness: 250}),
  y: spring(y || 0, {stiffness: 250}),
  w: spring(w || 0, {stiffness: 250}),
  h: spring(h || 0, {stiffness: 250}),
  show: spring(show, {stiffness: 250}),
});

export default ({stateNavigator}) => (
  <NavigationMotion
    startStateKey="grid"
    unmountedStyle={(state, data, sceneData) => {
      if (sceneData && sceneData.fromX)
        data = {...data, x: sceneData.fromX, y: sceneData.fromY, w: sceneData.fromW, h: sceneData.fromH};
      return getStyle(data, 0);
    }}
    mountedStyle={(state, data, sceneData) => getStyle({...data, ...sceneData}, 1)}
    crumbStyle={getStyle({}, 1)}
    style={{flex: 1}}
    stateNavigator={stateNavigator}>
    {({show, x, y, w, h}, scene, url, state, {color}) => (
      <View key={url} style={styles.scene}>
        <View
          style={{
            position: 'absolute',
            left: x,
            top: y,
            width: w,
            height: h,
            backgroundColor: color,
          }}>
        </View>
        <View
          style={{
            flex: 1,
            opacity: Math.floor(show),
          }}>
          {scene}
        </View>
      </View>
    )}
  </NavigationMotion>
);

const styles = StyleSheet.create({
  scene: {
    position: 'absolute',
{'fraction_non_alphanumeric': 0.17342273697043584, 'fraction_numerical': 0.01584882657726303, 'mean_word_length': 2.362704918032787, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1547641', 'n_tokens_mistral': 1105, 'n_tokens_neox': 1047, 'n_words': 265}