Skip to content

Instantly share code, notes, and snippets.

View tenadavila's full-sized avatar

José Tena tenadavila

View GitHub Profile
@Hendler
Hendler / cuda_aws_ubuntu_theano_tensorflow_nlp.md
Last active July 4, 2021 10:06
Installing the best Natural Language Processing Python machine learning tools on an Ubuntu GPU instance

Awesome NLP on AWS GPU

Tech:

  • Ubuntu
  • Nvidia Cuda
  • Python
  • Theano
  • TensorFlow
  • Keras
@alexfu
alexfu / ColorUtils.java
Last active January 30, 2023 00:04
Automatic text color selection using relative luminance.
public class ColorUtils {
private static final double LM_RED_COEFFICIENT = 0.2126;
private static final double LM_GREEN_COEFFICIENT = 0.7152;
private static final double LM_BLUE_COEFFICIENT = 0.0722;
public static int calculateRelativeLuminance(int color) {
int red = (int) (Color.red(color) * LM_RED_COEFFICIENT);
int green = (int) (Color.green(color) * LM_GREEN_COEFFICIENT);
int blue = (int) (Color.blue(color) * LM_BLUE_COEFFICIENT);
return red + green + blue;
@tomgibara
tomgibara / SquareGridLayout.java
Created November 27, 2010 01:22
Square grid layout for Android
package com.tomgibara.android.util;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
/**
* A layout that arranges views into a grid of same-sized squares.