Skip to content

Instantly share code, notes, and snippets.

View Raniita's full-sized avatar
🎯
Focusing

Enrique 'Ranii' Raniita

🎯
Focusing
  • Cartagena, Spain
View GitHub Profile
@Raniita
Raniita / Form1.cs
Created February 2, 2020 07:49
RGB to YUV exam example
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
@Raniita
Raniita / api.py
Last active July 15, 2021 10:09
46elks Junction 2019 SMS tests
import requests
API_USERNAME = 'asdasdasdasdasdasdsa'
API_PASSWORD = 'asdasdasdasdasdasdada'
requests.post(
'https://api.46elks.com/a1/sms',
auth = (API_USERNAME, API_PASSWORD),
data = {
'from': 'PythonElk',

Keybase proof

I hereby claim:

  • I am raniita on github.
  • I am ranii (https://keybase.io/ranii) on keybase.
  • I have a public key ASC1S0XqsUFX5AN5-8YUH82N7TrM3jEqgcBgjK5AV8es7wo

To claim this, I am signing this object:

@Raniita
Raniita / FSM_template.vhd
Created June 20, 2019 09:36
Basic template for FSM in vhdl
-- Template para ejercicios de FSM
type state_type is (st1_name, st2_name, ...);
signal current_state, next_state : state_type;
signal output_i : std_logic;
-- Proceso dedicado al reloj
STATE_PROC:process(clk)
begin
if(clk'event and clk = '1') then
@Raniita
Raniita / RealAlgorithmTemplate.java
Created June 20, 2019 09:36
Template for java examn with net2plan
//Esta es la template real para el examen final de las practicas de teoria de redes
package ;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import com.net2plan.interfaces.networkDesign.IAlgorithm;
import com.net2plan.interfaces.networkDesign.NetPlan;
@Raniita
Raniita / polybius.m
Created June 12, 2019 20:47
polybius cipher
function [msg_cifrado] = polybius(msg, clave)
% msg -> msg a TX
% clave -> matriz para seguir el cifrado
msg_cifrado = '';
for i=1:length(msg)
% Buscamos el caracter
cipher_matrix = strfind(clave, msg(i));
[row,col] = find(not(cellfun('isempty',cipher_matrix)));
@Raniita
Raniita / script_medidas_aloha.m
Created May 31, 2019 09:28
Obtención de medidas de SDL ALOHA
%% Extraccion de los valores de la simulacion
% Datos de la practica
N_nodos = 6;
ranuras = 10000;
% Valores de PG probados
PG = {'0', '01', '025', '05', '075', '1', '125', '150', '175', '2', '25', '3', '35', '4', '45', '5', '6', '7', '8', '9', '95'};
TO = zeros(1,21);
TC = zeros(1,21);