Skip to content

Instantly share code, notes, and snippets.

View denisb411's full-sized avatar

Denis Candido denisb411

  • Campinas - SP, Brazil
View GitHub Profile
@denisb411
denisb411 / grafana-dashboard-script.js
Last active September 1, 2022 08:15
Grafana dashboard script with postMessage communication
/* global _ */
/*
* Complex scripted dashboard
* This script generates a dashboard object that Grafana can load. It also takes a number of user
* supplied URL parameters (in the ARGS variable)
*
* Return a dashboard object, or a function
*
* For async scripts, return a function, this function must take a single callback function as argument,
/* global _ */
/*
* Complex scripted dashboard
* This script generates a dashboard object that Grafana can load. It also takes a number of user
* supplied URL parameters (in the ARGS variable)
*
* Return a dashboard object, or a function
*
* For async scripts, return a function, this function must take a single callback function as argument,
@denisb411
denisb411 / zombie_matrix.c
Last active June 18, 2018 13:59
zombie exercices using matrix - c
#include <stdio.h>
#include <stdlib.h>
/* Trabalho - The Walking Dead
Algoritmos e Lógica de Programação e Matemática Discreta
Desenvolvedores:
Thainnara dos Santos RA: 2760481811013
Vitor Gonçalves RA: 2760481811016 */
#define VAZIO 0
#define HUMANO 1
@denisb411
denisb411 / .vimrc
Created April 13, 2018 19:27
Configured vimrc mainly for python development
set nocompatible " required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
@denisb411
denisb411 / PST_messages_extractor.py
Last active January 30, 2024 23:20
Script used to extract messages from .pst file at json format
import os
import sys
import argparse
import json
from shutil import rmtree
import re
import pypff
sys.setrecursionlimit(10000)
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <pthread.h>
#include <float.h>
#include <time.h>
#include <mpi.h>
#define MASTER 0
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <pthread.h>
#include <float.h>
#include <time.h>
#include <mpi.h>
#define MASTER 0
#define N_TAREFAS 5
import os
import librosa.display
import numpy as np
import pandas as pd
import tensorflow as tf
df = pd.read_csv('samples_nylonGuitar_1024_Mm7_R03.csv')
X_load = np.array(df.iloc[:,:-1], dtype=np.float)
@denisb411
denisb411 / MicrophoneTracker.swift
Last active November 29, 2017 08:50
An swift iOS class that tracks the microphone fundamental frequency, max amplitude and the microphone samples. Uses the AudioKit framework.
//
// StandardGuitarViewController.swift
// Universal_Tuner
//
// Created by Denis França Candido on 01/04/17.
// Copyright © 2017 Denis França Candido. All rights reserved.
//
import Foundation
import UIKit
@denisb411
denisb411 / samples_test.py
Created June 1, 2017 14:36
Python code that collects the audio input samples
import pyaudio
import numpy as np
import time
import wave
import matplotlib.pyplot as plt
# open stream
FORMAT = pyaudio.paInt16
CHANNELS = 1