Skip to content

Instantly share code, notes, and snippets.

View carlosdelfino's full-sized avatar
💭
De volta as origens, com o canal Basicão da Eletrônica

Carlos Delfino carlosdelfino

💭
De volta as origens, com o canal Basicão da Eletrônica
View GitHub Profile
@carlosdelfino
carlosdelfino / README.md
Created October 12, 2019 18:57
HUFFMAN CODING IN C

HUFFMAN CODING IN C

Huffman coding is a compression method which generates variable-length codes for data – the more frequent the data item, the shorter the code generated. This allows more efficient compression than fixed-length codes. This is an implementation of the algorithm in C. The function huffman() takes arrays of letters and their frequencies, the length of the arrays, and a callback which is called for each code generated. The algorithm requires a priority queue, and I used a min-heap for the purpose.

DYNAMIC ARRAY IN C

A dynamic array is one that grows to accommodate new items, overcoming the limitations of fixed-size arrays. New items can be added at the head or tail, or inserted in the middle. Existing elements are moved to accommodate new ones as necessary.

MIN-HEAP IN C

@carlosdelfino
carlosdelfino / CMakeLists.txt
Last active October 7, 2019 13:45
Exemplo de configuração e codificação usando VCPkg e CMaker
# CMakeLists.txt
cmake_minimum_required(VERSION 3.0)
project("Hello World OpenCV com VCPkg e CMake")
find_package(OpenCV CONFIG REQUIRED)
add_executable(main main.cpp)
target_link_libraries(main PRIVATE opencv_core opencv_imgproc opencv_videoio opencv_highgui)
@carlosdelfino
carlosdelfino / Readme.md
Last active April 13, 2019 16:51 — forked from mheadd/fastagi.js
Node.js script to execute FastAGI application

Launch the node TCP server for FastAGI:

~$ node path/to/fastagi.js

Add a context for FastAGI testing:

[fastagi-test]
@carlosdelfino
carlosdelfino / gist:e5c90332100682b54b917591d352c14b
Created February 7, 2019 20:51
Arduinisk, buscando uma solução para comunicar com a porta Serial, recurso chamado SMDI, busco recurso que possa usar para envio e recebimento de dados pela porta serial, sem que seja pelo System() ou TrySystem().
[arduinisk]
exten => s,1,NoOp
exten => s,2,Set(regx="([a-zA-Z0-9]+)")
exten => s,3,Set(CCIDNAME=$["${CALLERIDNAME}": ${regx}])
exten => s,4,Set(regx="([0-9]+)")
exten => s,5,Set(CCIDNUM=$["${CALLERIDNUM}": ${regx}])
exten => s,6,ComunicaSerial("${DATETIME}, ${CCIDNAME},${CCIDNUM}")
[arduinisk]
exten => s,1,NoOp
exten => s,2,Set(regx="([a-zA-Z0-9]+)")
exten => s,3,Set(CCIDNAME=$["${CALLERIDNAME}": ${regx}])
exten => s,4,Set(regx="([0-9]+)")
exten => s,5,Set(CCIDNUM=$["${CALLERIDNUM}": ${regx}])
exten => s,6,ComunicaSerial("${DATETIME}, ${CCIDNAME},${CCIDNUM}")
// Vibration meter
// v1.0, June 2014
// GrMis - RCGROUPS
// Mais Informações visite: http://forum.arduino.cc/index.php?topic=225776.0 ou https://www.rcgroups.com/forums/showthread.php?2197784-DIY-vibration-meter-for-propeller-or-motor-balancing-%28etc-%29-Arduino-MMA7361
#include <Wire.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h> // F Malpartida's NewLiquidCrystal library
#define I2C_ADDR 0x20 // I2C for PCF8574A inside the MJKDZ
{
"extends": ["tslint:recommended", "tslint-react", "tslint-config-prettier"],
"linterOptions": {
"exclude": ["node_modules/**/*.ts"]
},
"rules": {
"interface-over-type-literal": false,
"jsx-boolean-value": [true, "never"],
"jsx-no-lambda": false,
"no-console": false,
### Keybase proof
I hereby claim:
* I am carlosdelfino on github.
* I am carlosdelfino (https://keybase.io/carlosdelfino) on keybase.
* I have a public key whose fingerprint is 4504 30C3 504C AF58 ABB4 4238 153A 1E26 C8DB A2D4
To claim this, I am signing this object:
@carlosdelfino
carlosdelfino / watch config-manager.js
Last active August 6, 2018 20:17
Um sistema que permite manter as propriedades atualizadas conforme alterações de registros no banco de dados
const BaseManager = require('./base-manager');
const Config = require('../models/config');
let count = 0;
function checkProp(key) {
return typeof key === 'symbol' ||
(typeof key === 'object' && Object.prototype.toString.call(key) === '[object Symbol]') || ['model', 'isNew', 'errors'].indexOf(key.toString()) > -1 ||
!isNaN(key) ||
/^\$/.test(key) ||
@carlosdelfino
carlosdelfino / housing.ipynb
Last active August 2, 2018 21:30
handson-ml-scikit-tensorflow/housing.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.