Skip to content

Instantly share code, notes, and snippets.

View jefersondaniel's full-sized avatar

Jeferson Daniel jefersondaniel

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jefersondaniel on github.
  • I am jefersondaniel (https://keybase.io/jefersondaniel) on keybase.
  • I have a public key whose fingerprint is 79ED 5D3C 654A D056 313A 5242 90A6 8307 9413 3E99

To claim this, I am signing this object:

@jefersondaniel
jefersondaniel / adb_commands.md
Last active April 13, 2021 17:53
ADB Cheatsheet

Uninstall, Install, Run and Stop

adb uninstall com.package
adb install -r app.apk
adb shell am start -n com.package/com.package.Activity
adb shell am force-stop com.package

Take Screenshot

@jefersondaniel
jefersondaniel / haar.py
Created June 21, 2020 17:03
OpenCV Body Detection
import time
import numpy as np
import cv2
from matplotlib import pyplot as plt
photos = [
'C:\\Users\\jefer\\Pictures\\pessoas.jpg',
]
img = cv2.imread(photos[0],cv2.IMREAD_COLOR)
[{"prebid":{"targeting":{"lala":"lala"}}}]
@jefersondaniel
jefersondaniel / convert_svg_android.py
Created February 24, 2020 00:44
Convert SVG to Android Drawables PNGs
#!/usr/bin/env python3
import sys
import tempfile
import os
import argparse
import re
parser = argparse.ArgumentParser(description='Generate png icons from svg')
parser.add_argument('input_file', nargs=1, help='Input svg file')
parser.add_argument('output_directory', nargs=1, help='Drawable directory')
@jefersondaniel
jefersondaniel / makeRenderChecker.js
Last active January 2, 2020 19:49
makeRenderChecker.js
function makeRenderChecker() {
let oldProperties: any = {};
return (name: string, newProperties: any) => {
let rerender = false;
let changedKeys: String[] = [];
if (Object.keys(oldProperties).length === 0) {
oldProperties = newProperties;
console.log(name + " rendered");
(function(XHR) {
"use strict";
var open = XHR.prototype.open;
var send = XHR.prototype.send;
var openUrl = null;
var responses = [];
XHR.prototype.open = function(method, url) {
openUrl = url;
open.apply(this, arguments);
};
def smooth_curve(points, factor=0.9):
smoothed_points = []
for point in points:
if smoothed_points:
previous = smoothed_points[-1]
smoothed_points.append(previous * factor + point * (1 - factor))
else:
smoothed_points.append(point)
return smoothed_points
@jefersondaniel
jefersondaniel / README.md
Last active March 1, 2019 16:15
Python Ploting In Pratice

Python Ploting

Libs

import matplotlib.pyplot as plt
import seaborn as sns

Distribution plot