Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
#
# Very simple Python script to dump all emails in an IMAP folder to files.
# This code is released into the public domain.
#
# RKI Nov 2013
# Modified by Cristian Maruan Bosin 2018
import sys
import imaplib
function [y, m] = meu_filtro(x, n)
M = zeros(3, length(n) + 2);
M(1,1:length(n)) = x;
M(2,2:length(n)+1) = x;
M(3,3:length(n)+2) = x;
y = [1, 2/3, 1/3] * M;
m = min(n):max(n)+2;
end
function test
#ifndef SINGLY_LINKED_LIST_H
#define SINGLY_LINKED_LIST_H
/**
* This structure represents the individual node of
* a singly linked list.
*/
struct single_node {
// const void * data; /* generic pointer to a relevant information */
@cmaruan
cmaruan / gist:4028592cc61e4445ddbe
Created October 13, 2015 19:20
Compiladores Trab Final
TRAB FINAL: OPCOES:
[2] a) Pretty printer do mini pascal
Imprime o codigo de forma identada.
[4] b) Tradutor do MiniJava para Java Byte Code
http://cs.au.dk/~mis/dOvs/slides/46a-codegeneration.pdf (gerar Java -> Jasmin)
@cmaruan
cmaruan / client.c
Last active November 23, 2015 16:20
Simple client in C
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netdb.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <arpa/inet.h>
@cmaruan
cmaruan / server.c
Last active November 23, 2015 16:20
Simple server in C
/* A simple server in the internet domain using TCP
The port number is passed as an argument
This version runs forever, forking off a separate
process for each connection
*/
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
TimeQuest Timing Analyzer report for FloatProj
Tue Jun 30 19:47:59 2015
Quartus II 64-Bit Version 15.0.0 Build 145 04/22/2015 SJ Full Version
---------------------
; Table of Contents ;
---------------------
1. Legal Notice
2. TimeQuest Timing Analyzer Summary
@cmaruan
cmaruan / designer.html
Last active August 29, 2015 14:22
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
#ifndef CONSOLE_H
#define CONSOLE_H
#include <QTextEdit>
#include <QKeyEvent>
#include <QQueue>
#include <QEventLoop>
#include <QDebug>
class Console : public QTextEdit
#ifndef CONSOLE_H
#define CONSOLE_H
#include <QTextEdit>
#include <QKeyEvent>
#include <QQueue>
#include <QEventLoop>
class Console : public QTextEdit