Skip to content

Instantly share code, notes, and snippets.

View guilhermebene's full-sized avatar

Guilherme Beneti Martins guilhermebene

View GitHub Profile
@guilhermebene
guilhermebene / eturnal-credentials.py
Created May 28, 2023 01:22
A Python function for creating credentials for using TURN services provided by eturnal STUN/TURN Server
import base64
import hashlib
import hmac
import json
import time
from datetime import datetime, timedelta
def create_credentials(secret, suffix):
"""Creates credentials for Eturnal access available for 24 hours.
@guilhermebene
guilhermebene / content-based-filtering.ipynb
Last active May 7, 2021 13:38
Content-based Filtering
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@guilhermebene
guilhermebene / mbed_jupiter.sh
Last active April 6, 2019 19:42
Script to install mbed-cli and all its dependencies - Projeto Jupiter - 2019
#!/bin/bash/
sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
sudo apt-get update
sudo apt-get install gcc-arm-embedded
sudo apt-get install git
sudo apt-get install libnewlib-dev
sudo apt-get install python2.7
sudo apt-get install python-pip
sudo apt-get install python3
@guilhermebene
guilhermebene / ac_dc_multimeterMain.cpp
Last active November 4, 2017 01:21
This is the code developed (in a hurry) for an introductory electric circuits laboratory class. The goal was to use a FRDM-KL25Z board and its microcontroller, connected to a LCD screen module, creating a multimeter that should measure frequency and voltage for AC inputs and only voltage for DC inputs. It uses the [mbed library] (https://os.mbed…
#include "mbed.h"
#include "Timer.h"
#include "math.h"
#include "TextLCD.h"
#define CONVERSAO(x) (3.3*x)
TextLCD lcd(PTA13, PTD5, PTC9, PTC8, PTA5, PTA4);
AnalogIn medida(PTB0);