This is a Python script to consume OSM changesets API.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Arduino script to connect an analog joystick | |
| to an Arduino UNO. | |
| Author: Rodolfo Ferro | |
| Site: https://rodolfoferro.xyz/ | |
| */ | |
| // Define ports: | |
| int xPin = A1; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Python 2/3 compatibility | |
| from __future__ import print_function | |
| import numpy as np | |
| import imutils | |
| import cv2 | |
| import sys | |
| # Global vars: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import psutil | |
| # Get current Process ID: | |
| pid = os.getpid() | |
| def get_memory_status(pid): | |
| # Build psutil process from PID: | |
| p = psutil.Process(pid) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| // Declaracion de funciones: | |
| void genera_juego(); | |
| void imprime_instrucciones(); | |
| int genera_mano_random(); | |
| int juega_manos(int mano_usuario, int mano_compu); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| global x, y | |
| global vx, vy | |
| w, h = 700, 500 | |
| x, y = random(0, w), random(0, h) | |
| vx, vy = 5, 3 | |
| def draw_pikachu(cx, cy, s): | |
| # Yellow part of the face: | |
| fill(229, 183, 61) | |
| ellipse(cx, cy, 150*s, 150*s) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import cv2 | |
| import numpy as np | |
| # Loadimage and convert to grayscale for posterior processing: | |
| img = cv2.imread('demo.jpg') | |
| gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) | |
| # Buils a kernel for dilation: | |
| kernel = np.ones((3, 3), np.uint8) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from hashlib import sha256 | |
| def hash_password(password): | |
| """Hash a password using SHA256.""" | |
| return sha256(str.encode(password)).hexdigest() | |
| def verify_password_hash(password, hash): |