Skip to content

Instantly share code, notes, and snippets.

View andrequeiroz's full-sized avatar
🙂
Just coding

André Queiroz andrequeiroz

🙂
Just coding
View GitHub Profile
@andrequeiroz
andrequeiroz / normal_table.c
Created October 8, 2017 21:09
C program that calculates the normal cumulative distribution function values
// compilation: gcc -Wall -std=c99 -lm normal_table.c -o normal_table
#include <stdio.h>
#include <time.h>
#include <math.h>
#define pi 3.14159265359
float valor(double [], double);
int main(void) {
@andrequeiroz
andrequeiroz / bingo.r
Last active October 9, 2018 00:15
Custom bingo cards for the lazy
library(ggplot2)
bingo_numbers <- function(n, max_outcome) {
n <- as.integer(n)
if (length(n) > 1 || n <= 0) {
stop("n must be a single integer greater than zero")
}
@andrequeiroz
andrequeiroz / win10toFD.sh
Created October 12, 2019 17:55
Windows 10 USB Flash Drive Install Media
#!/usr/bin/env bash
# usage: script usbdevice isoimage. e.g. script /dev/sde ~/Downloads/Win10_x32.iso
echo "Creating Windows 10 Bootable USB Flash Drive on Linux Terminal"
sleep 3s
echo -n "Formating USB Flash Drive..........................."
parted --script $1 \
mklabel gpt \
@andrequeiroz
andrequeiroz / arch_on_vb.sh
Last active October 12, 2019 20:37
Install Arch Linux on VirtualBox over UEFI
#!/usr/bin/env bash
# if host is Arch install virtualbox-guest-utils-nox virtualbox-guest-modules-arch on guest, otherwise mount guest additions CD image after install and run ./VBoxLinuxAdditions.run
echo "Minimal Arch Linux on VirtualBox UEFI"
sleep 3s
# Keyboard layout
echo -n "Keyboard layout......."
loadkeys br-abnt2
@andrequeiroz
andrequeiroz / holtwinters.py
Last active July 5, 2023 07:50
Implementation of Holt-Winters algorithms in Python 2
#The MIT License (MIT)
#
#Copyright (c) 2015 Andre Queiroz
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#copies of the Software, and to permit persons to whom the Software is
#furnished to do so, subject to the following conditions: