This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <ctype.h> | |
#include <unistd.h> | |
int main (int argc, char *argv[]) | |
{ | |
int opcao; // Opção passada pelo usuário ao programa. | |
int indice; // Usado para pegar argumentos que não são opções | |
// Nem argumentos usados em opções. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Este script pega dados gerados pelo programa SAC e monta uma tabela com os seus | |
# valores, além de realizar o cálculo para a magnitude mR, média e desvio padrão. | |
# | |
# Autor: Elder Marco. | |
# Data: 13/06/2010 | |
# | |
#-------------------------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/awk -f | |
# | |
# Programa para calcular média e desvio padrão em awk | |
#----------------------------------------------------------------------- | |
{ | |
soma+=$1 | |
somaquad+=$1*$1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Elder Marco <eldermarco at gmail dot com> | |
pkgname=gpaste | |
pkgver=2.5 | |
pkgrel=1 | |
pkgdesc="Clipboard management system with a gnome-shell extension" | |
license=('GPL3') | |
url="https://github.com/Keruspe/GPaste" | |
source=("https://github.com/downloads/Keruspe/GPaste/$pkgname-$pkgver.tar.xz") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
from datetime import timedelta, date, datetime | |
from dateutil import rrule | |
def get_holidays (year): | |
""" | |
Dado um ano year, essa função retorna todos os feriados cadastrados no | |
sistema para esse ano. O retorno é na forma de uma lista de objetos do tipo | |
datetime | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Faz o cálculo de uma expressão matemática. A precisão é de duas casas decimais, | |
# por default. Mas é possível alterar isso com a opção -p/--precision. Trata-se de | |
# uma calculadora simples e bastante útil para o terminal do Linux. | |
function calc () | |
{ | |
local OPTIONS | |
local -r SHORT_OPTIONS="p:h" | |
local -r LONG_OPTIONS="precision:,help" | |
local PRECISION=2 |