Skip to content

Instantly share code, notes, and snippets.

View enzoftware's full-sized avatar
:shipit:
Probably sleeping

Enzo Lizama Paredes enzoftware

:shipit:
Probably sleeping
View GitHub Profile
@enzoftware
enzoftware / RaffleSqliteDBHelper.kt
Created August 18, 2018 16:58
SQLite helper secret example xddddd
package com.dupla.dupla.db
import android.content.Context
import android.database.sqlite.SQLiteDatabase
import android.database.sqlite.SQLiteOpenHelper
import android.util.Log
/**
* Created by enzoftware on 4/20/18.
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Plantilla Admin</title>
<!-- Bootstrap core CSS -->
package semana09.controller;
import java.util.Optional;
import javax.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Plantilla Admin</title>
<!-- Bootstrap core CSS -->
@enzoftware
enzoftware / MetalBall.kt
Created November 10, 2017 05:02
Metallball main activity
package com.projects.enzoftware.metalball
import android.app.Service
import android.bluetooth.BluetoothClass
import android.content.Context
import android.content.pm.ActivityInfo
import android.graphics.Bitmap
import android.graphics.BitmapFactory
import android.graphics.Canvas
import android.graphics.Point
@enzoftware
enzoftware / median-filter.py
Last active November 22, 2024 14:57
Median filter in python 🐍
from PIL import Image
path = "noise.png" # Your image path
img = Image.open(path)
members = [(0,0)] * 9
newimg = Image.new("RGB",(width,height),"white")
for i in range(1,width-1):
for j in range(1,height-1):
members[0] = img.getpixel((i-1,j-1))
members[1] = img.getpixel((i-1,j))
members[2] = img.getpixel((i-1,j+1))
@enzoftware
enzoftware / sobel-filter.py
Last active October 5, 2021 19:03
Sobel filter in Python for edge detection 🐍
from PIL import Image
import math
path = "peru.jpeg" # Your image path
img = Image.open(path)
newimg = Image.new("RGB", (width, height), "white")
for x in range(1, width-1): # ignore the edge pixels for simplicity (1 to width-1)
for y in range(1, height-1): # ignore edge pixels for simplicity (1 to height-1)
# initialise Gx to 0 and Gy to 0 for every pixel
Gx = 0