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
struct Struct1 { | |
unsigned int a0; | |
unsigned int a1; | |
unsigned int a2; | |
unsigned int a3; | |
}; | |
struct Struct2 { |
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
/* nessa versão o avião nunca pega o pombo */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#define dprintf if (debug) printf | |
const char debug = 0; /* or 0 if you want disable debug */ | |
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
# -*- coding: utf-8 -*- | |
from pylab import * | |
N = 100 | |
start = 0 | |
end = 1 | |
A = rand() | |
B = rand() |
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
# -*- coding: utf-8 -*- | |
# Tiago Maluta | |
# License: GPLv3 | |
import simplejson | |
import urllib | |
f = open("download.sh","w+") | |
f.write("#!/bin/sh\n") |
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
/* | |
This was discussed in http://www.c-faq.com/struct/structhack.html | |
Despite its popularity, the technique is also somewhat notorious: | |
Dennis Ritchie has called it ``unwarranted chumminess with the C implementation,'' | |
and an official interpretation has deemed that it is not strictly conforming with | |
the C Standard, although it does seem to work under all known implementations. | |
(Compilers which check array bounds carefully might issue warnings.) |
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
entity exemplo is | |
port ( | |
a,b,c,d : in bit; | |
f : out bit | |
); | |
end exemplo; |
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
entity exemplo is | |
port ( | |
a : in bit; | |
x : inout bit | |
); | |
end exemplo; |
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
entity exemplo is | |
port ( | |
a,b : in bit; | |
c : in bit_vector (2 downto 0); | |
d : buffer bit; | |
e : inout std_logic_vector (3 downto 0); | |
f : out bit | |
); |
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/env python | |
# -*- coding: utf-8 -*- | |
# Tiago Maluta | |
# GPLv3 | |
import cgi | |
import hashlib | |
from google.appengine.ext import webapp | |
from google.appengine.ext.webapp import util |
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
entity mux is | |
port ( | |
din_1 : in bit_vector (7 downto 0); | |
din_2 : in bit_vector (7 downto 0); | |
din_3 : in bit_vector (7 downto 0); | |
din_4 : in bit_vector (7 downto 0); | |
dout : out bit_vector(7 downto 0); | |
sel : in bit_vector (1 downto 0) | |
); | |
end mux; |