Skip to content

Instantly share code, notes, and snippets.

View FRodrigues21's full-sized avatar
🎯
Hmmmmm

Francisco Rodrigues FRodrigues21

🎯
Hmmmmm
  • Reachdesk
  • Portugal
View GitHub Profile
@FRodrigues21
FRodrigues21 / dbController.js
Last active April 23, 2020 20:37
🔎 Example of Tedious SQL Server DB controller in Node.js (non-concurrent)
var Connection = require("tedious").Connection;
var Request = require("tedious").Request;
var ConnectionPool = require("tedious-connection-pool");
// Avoiding concurrent SQL SERVER calls
var poolConfig = {
min: 1,
max: 1,
log: true
};
@FRodrigues21
FRodrigues21 / cfreportlatex.py
Last active January 4, 2023 19:16
Parse and convert scikit-learn classification_report to latex (Python 3 / Booktabs)
"""
Code to parse sklearn classification_report
Original: https://gist.github.com/julienr/6b9b9a03bd8224db7b4f
Modified to work with Python 3 and classification report averages
"""
import sys
import collections
@FRodrigues21
FRodrigues21 / cmtolatex.py
Last active June 28, 2024 14:23
Array Confusion Matrix to LaTeX Table
def gen_align(align, size):
texto = ""
for i in range(0,size):
texto += align
return texto
def gen_header(size):
header = " "
for i in range(0, size):
header += "& " + str(i) + " "
@FRodrigues21
FRodrigues21 / data_archive_comparison.md
Last active January 15, 2020 11:31
Data Archive Approach Comparison

Data Archive Approach Comparison

Conditions

  • Documents only
  • Limited to 5 documents

Benchmark

		user     system      total        real
jbuilder:   	1.501785   0.083033   1.584818 (  3.968501)
as_json: 0.993441 0.054661 1.048102 ( 3.359240)