Skip to content

Instantly share code, notes, and snippets.

View bkawakami's full-sized avatar
🎯
Focusing

Bruno Kawakami bkawakami

🎯
Focusing
View GitHub Profile
@bkawakami
bkawakami / SessionUtils.java
Created December 4, 2014 18:47
Android Session Utils
public class SessionData {
private final HashMap<String,String> data = new HashMap<String,String>();
// METHODS para acessar data
public String get(String key) {
return data.get(key);
}
public static void put(String key, String value){
data.put(key,value);
@bkawakami
bkawakami / FacebookUtils.java
Created January 19, 2015 14:21
Facebook Login
private static void facebookAuth(View view, Fragment fragment){
List<String> permissions = Arrays.asList("email","public_profile");
final LoginButton facebookLoginButton = (LoginButton) view.findViewById(R.id.authButton);
facebookLoginButton.setFragment(fragment);
facebookLoginButton.setBackgroundResource(R.drawable.icon_user);
facebookLoginButton.setReadPermissions(permissions);
@bkawakami
bkawakami / README.md
Last active August 2, 2017 17:47
Configurar o Gradle para um projeto em Kotlin

Configurar Kotlin no Gradle

Adicionar ao build.gradle da pasta app

1

apply plugin: 'kotlin-android'
@bkawakami
bkawakami / LoginFragment.kt
Last active August 29, 2015 14:26
Repo and code for Android Facebook auth
public fun facebookAuth(fragment: Fragment) {
val permissions = Arrays.asList("email", "public_profile", "user_events")
val loginButton = rootView!!.findViewById(R.id.login_button) as LoginButton
loginButton.setReadPermissions(permissions)
// If using in a fragment
loginButton.setFragment(this)
// Other app specific specialization
@bkawakami
bkawakami / Products.php
Created August 26, 2015 23:08
Products.php
<?php
namespace MyProject;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Facades\Validator;
class Products extends Model
{
@bkawakami
bkawakami / removebrew.sh
Created October 5, 2015 19:08
Remove Brew El Captain
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
cd /usr/local/
rm -rf .git*
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@bkawakami
bkawakami / .bash_profile
Created November 24, 2016 16:19
Bash Profile for macOS
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
alias ls='ls -GFh'
@bkawakami
bkawakami / install.sh
Created September 20, 2018 20:05
Install Linux ESCAPE
#!/bin/bash
sudo add-apt-repository -y ppa:viktor-krivak/pycharm
sudo add-apt-repository -y ppa:mmk2410/intellij-idea
sudo apt update
sudo apt install -y openjdk-8-jdk nodejs python curl git
sudo apt-get install -y pycharm intellij-idea-community
@bkawakami
bkawakami / sample_temporal.csv
Created August 15, 2022 02:41
A simple CSV to try in temporal prediction
column of date revenue per day
2020-01-01 213
2020-01-01 45
2020-01-01 654
2020-01-02 234
2020-01-02 564
2020-01-02 54
2020-01-03 546
2020-01-04 655
2020-01-05 354
@bkawakami
bkawakami / Iris.csv
Created August 15, 2022 02:53
The famous Iris dataset
sepallength sepalwidth petallength petalwidth class
5.1 3.5 1.4 0.2 Iris-setosa
4.9 3.0 1.4 0.2 Iris-setosa
4.7 3.2 1.3 0.2 Iris-setosa
4.6 3.1 1.5 0.2 Iris-setosa
5.0 3.6 1.4 0.2 Iris-setosa
5.4 3.9 1.7 0.4 Iris-setosa
4.6 3.4 1.4 0.3 Iris-setosa
5.0 3.4 1.5 0.2 Iris-setosa
4.4 2.9 1.4 0.2 Iris-setosa