Skip to content

Instantly share code, notes, and snippets.

View giljr's full-sized avatar
💭
Full Stack Developer with a degree in Computer Engineering.

Gilberto Oliveira Jr giljr

💭
Full Stack Developer with a degree in Computer Engineering.
View GitHub Profile
# # Python mqtt_sub_temp.py
# This program access Mysql inside PhpMyAdmin Application on my Raspberry PI
# It subscribe (as admin) to a Topic 'temp' the value 25 ° C
# Please create a User named user1, password 321 in your Pi
import paho.mqtt.client as mqtt
import requests
import sys
import mysql.connector
from datetime import date, datetime, timedelta
import time
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 25-April-2020 at 13:12
-- Server Version: 10.1.24-MariaDB
-- PHP Version: 7.1.6
--
@giljr
giljr / Car.py
Created March 23, 2020 22:34
Correcting the class- typo: accelarate = accelerate Studing Python 3 - 03/2020
class Car:
def __init__(self, speed=0):
self.speed = speed
self.odometer = 0
self.time = 0
def say_state(self):
print("I'm going {} kph!".format(self.speed))
def accelerate(self):
@giljr
giljr / test_Car.py
Created March 23, 2020 22:31
Testing Class - Unitest - for Car.py
import unittest
from Car import Car
class TestCar(unittest.TestCase):
def setUp(self):
self.car = Car()
@giljr
giljr / Car.py
Created March 23, 2020 18:52
My First Class using PyCharm - 03/2020
class Car:
def __init__(self, speed=0):
self.speed = speed
self.odometer = 0
self.time = 0
def say_state(self):
print("I'm going {} kph!".format(self.speed))
def accelarate(self):
@giljr
giljr / Microprocessor_Microcontroller_ComparatorTable.csv
Last active February 25, 2020 10:06
Microprocessor Microcontroller ComparatorTable - Fast & Easy
Comparator Microprocessor Microcontroller
Top Device Intel Core i7 7700K (liquid-cooled) PIC32MZ (DA series)
Run Their Program External Device like a Hard Drive or SSD EBI - External Bus interface - DDR2 DRAM
More Often Used Desktop Computers - Laptops Levels not yet seen in embedded microcontroller apps
Used too Tablets - and Cell Phones 2D GPU - GUI - High Perfo_Designs
Domain Market Automobile Cruiser - Intell.Thermostat - CPUs/TV/Cable/Satell./SetTop_Box Embedded System - GUI - HQ Graphics Apps
Speed Clock 4.2 GHz 100 to 800 MHz
RAM 32 GB 32 MB
Number Of Pins ~ 1000 ~ 200
~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@giljr
giljr / ubuntu-on-windows-10.txt
Created February 5, 2020 16:02 — forked from alexishida/ubuntu-on-windows-10.txt
Ubuntu on Windows 10
# https://docs.microsoft.com/en-us/windows/wsl/install-win10
1 - Open PowerShell as Administrator and run:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
2 - Restart your computer when prompted.
/*
AnalogReadPot
Reads an analog input on pin 0, prints the result to the Serial Monitor.
Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.
This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/AnalogReadSerial
*/