<commit_before>package net.henryco.opalette.activity.t1;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import net.henryco.opalette.R;
import net.henryco.opalette.glES.layouts.OPallSurfaceView;
import net.henryco.opalette.glES.render.camera.OPallCamera2D;
import net.henryco.opalette.glES.render.graphics.textures.OPallTexture;
import net.henryco.opalette.glES.render.renderers.OPallRenderer;
import net.henryco.opalette.utils.Utils;

public class T1Activity extends AppCompatActivity {

	private static final int ACTIVITY_SELECT_IMAGE = 2137;

	private OPallSurfaceView contentSurface;





	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_t1);

		contentSurface = (OPallSurfaceView) findViewById(R.id.contentSurface);
		contentSurface.setDimProcessor(OPallSurfaceView.DimensionProcessors.RELATIVE_SQUARE);
		contentSurface.setOnClickListener(v -> loadImage());
		int width = contentSurface.getWidth();
		int height = contentSurface.getHeight();

		contentSurface.setRenderer(new OPallRenderer(this, new OPallCamera2D(width, height, true)));



	}







	private void loadImage() {
		Intent intent = new Intent(Intent.ACTION_PICK,
				android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
		startActivityForResult(intent, ACTIVITY_SELECT_IMAGE);
	}







	@Override
	protected void onActivityResult(int requestCode, int resultCode, Intent data) {
		super.onActivityResult(requestCode, resultCode, data);
		contentSurface.update(() -> contentSurface.executeWhenDraw(gl -> {
			OPallRenderer renderer = (OPallRenderer) contentSurface.getRenderer();
			renderer.setShader(new OPallTexture(Utils.loadURIBitmap(this, data), this, OPallTexture.filter.LINEAR));
		}));
	}






}
<commit_msg>O!Palette!<commit_after>package net.henryco.opalette.activity.t1;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import net.henryco.opalette.R;
import net.henryco.opalette.glES.layouts.OPallSurfaceView;
import net.henryco.opalette.glES.render.camera.OPallCamera2D;
import net.henryco.opalette.glES.render.graphics.textures.OPallTexture;
import net.henryco.opalette.glES.render.renderers.OPallRenderer;
import net.henryco.opalette.utils.Utils;

public class T1Activity extends AppCompatActivity {

	private static final int ACTIVITY_SELECT_IMAGE = 2137;

	private OPallSurfaceView contentSurface;





	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_t1);

		contentSurface = (OPallSurfaceView) findViewById(R.id.contentSurface);
		contentSurface.setDimProcessor(OPallSurfaceView.DimensionProcessors.RELATIVE_SQUARE);
		contentSurface.setOnClickListener(v -> loadImage());
		int width = contentSurface.getWidth();
		int height = contentSurface.getHeight();

		contentSurface.setRenderer(new OPallRenderer(this, new OPallCamera2D(width, height, true)));



	}







	private void loadImage() {
		Intent intent = new Intent(Intent.ACTION_PICK,
				android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
		startActivityForResult(intent, ACTIVITY_SELECT_IMAGE);
	}



	@Override
	protected void onActivityResult(int requestCode, int resultCode, Intent data) {
		super.onActivityResult(requestCode, resultCode, data);
		contentSurface.update(() -> contentSurface.executeWhenDraw(gl -> {
			OPallRenderer renderer = (OPallRenderer) contentSurface.getRenderer();
			renderer.setShader(new OPallTexture(Utils.loadURIBitmap(this, data), this, OPallTexture.filter.LINEAR));
		}));
	}






}

{'fraction_non_alphanumeric': 0.10138248847926268, 'fraction_numerical': 0.005421523448088913, 'mean_word_length': 6.0285714285714285, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '3436156', 'n_tokens_mistral': 1243, 'n_tokens_neox': 1126, 'n_words': 184}