Skip to content

Instantly share code, notes, and snippets.

View SrMouraSilva's full-sized avatar
🎯
Focusing

Paulo Mateus SrMouraSilva

🎯
Focusing
View GitHub Profile
@radimih
radimih / Dockerfile
Last active April 20, 2023 10:53
Spring Boot Actuator based Docker HEALTHCHECK
FROM openjdk:11-jre-slim
EXPOSE 8080
ENV TZ=Europe/Moscow
RUN adduser --system --group --home /opt/app appuser
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl jq \
@file:Suppress("unused", "FunctionName", "IllegalIdentifier")
import android.annotation.SuppressLint
import android.app.Activity
import android.content.Context
import android.content.Intent
import android.os.Bundle
/**
* The best way to launch yourself an activity. Your implementation should enable the following api:
@eyecatchup
eyecatchup / git-commit-log-stats.md
Last active July 12, 2024 09:40
Some commands to get git commit log statistics for a repository on the command line.

git commit stats

Commands to get commit statistics for a Git repository from the command line -
using git log, git shortlog and friends.




@arianimartins
arianimartins / MainActivity.java
Created April 30, 2014 19:21
Efeito Fade-in e Fade-out na transição de telas ou fragments
//Em Activity
Intent i = new Intent(MainActivity.this, Destino.java);
startActivity(i);
overridePendingTransition(R.anim.fadein, R.anim.fadeout);
// Em fragments (provavelmente já possúi um código parecido com este)
FragmentManager fragmentManager = getSupportFragmentManager();
FragmentTransaction transaction = fragmentManager.beginTransaction();
transaction.setCustomAnimations(R.anim.fadein, R.anim.fadeout); //animação aqui
transaction.commit();
@mblondel
mblondel / letor_metrics.py
Last active April 24, 2024 19:43
Learning to rank metrics.
# (C) Mathieu Blondel, November 2013
# License: BSD 3 clause
import numpy as np
def ranking_precision_score(y_true, y_score, k=10):
"""Precision at rank k
Parameters