Archive for the 'FEUP' Category
My “Computer Networks” (Redes de Computadores) assignment is writing an HTTP server that implements GET and conditional (if-modified-since) GET with persistent connections.
Here’s the code - Obviously, no guarantees.
This one instead reads the values from a CSV file containing experimental data.
Link to my previous implementation of Simspson’s rule.
import csv
class simpsonCsv:
   def __init__(self, filename):
       reader = csv.reader(open(filename, "rb"))
       xlist = []
       ylist = []
      Â
       for row in reader:
           try:
              x = float(row[0])
              y = float(row[1])
           except TypeError:
               continue
           except ValueError:
               continue
           xlist.append(float(x))
           ylist.append(float(y))
      Â
       self.len [...]
def simpson(f, a, b, n):
   "Approximate the definite integral of f from a to b by Simpson's rule."
   if n % 2 != 0:
       print "Ups: n must be even!"
       return -1
      Â
   h = (float(b) - a)/n
  Â
   si = 0.0
   sp = 0.0
  Â
   for i in range(1, n, 2):
       xk = a [...]
# this requires numpy get it from http://numpy.sf.net
from copy import deepcopy
from numpy import *
# this function, swapRows, was adapted from
# Numerical Methods Engineering with Python, Jean Kiusalaas
def swapRows(v,i,j):
   """Swaps rows i and j of vector or matrix [v]."""
   if len(v) == 1:
      v[i],v[j] = v[j],v[i]
   else:
      temp = v[i].copy()
      v[i] = v[j]
  [...]
I finally decided to take the Numerical Methods (MNUM) course. It turns out it’s a lot more fun than I thought. There is programming involved but you can chose to use whatever language you want. This is yet another nice excuse for me to use Python instead of C++ or Java. Last semester I was [...]
Or not. Someone got min() and max() confused:
Nota Final = max(Nota do exame final+Nota do trabalho, 1
translation: Final Grade = max(Exam Grade + Assignment Grade, 1
[Note: it’s 18/20 - 20 is the maximum grade possible)
Than again, maybe it’s not a mistake. Perhaps the teacher really enjoys giving high grades in the 18-20 [...]
If you happen to study at FEUP or maybe even somewhere else in Portugal or you just happen to enjoy this kind of humor check out:
Motivational Posters (warning1: not work safe) (warning2: mostly in portuguese)
Since there’s (apparently) been some discussion (I missed) @ PrintScreen about what’s the best programming language for beginners I’ll leave here my opinion:
Python
I don’t feel like copy-pasting & summarizing a bunch of text so I’ll just leave the link for a (draft) paper I co-authored which looks at the issue in some detail
A Look At [...]
matava-os a todos.
Translation: “Reds, yellows, I’d kill them all”
That was what a library employee at my faculty was screaming when he stabbed a cafeteria employee yesterday at lunch time and did other random crazy person stuff until he was stopped.
I guess it’s a good thing that all this person had was a pocket knife instead [...]
I’ve moved my blog outside of FEUP. Why? Because some employees (or maybe it was just one person) of CICA decided to block neacm.fe.up.pt, the server that hosted my blog and others (blogs.fe.up.pt).
When administrator realized that the server was inaccessible from the outside, he asked the networks people to look into it to see if [...]
FEUP Tags is a bookmark sharing service (like del.icio.us) made available by NEACM to students, teachers and employees of the faculty.
During the past semester’s exam season, having found several links to useful information and software on the Internet (like JFLAP) I began to wonder what would be the best way to share them with my [...]
I just found JFLAP an incredibly useful java program for anyone doing (basic?) automata theory (e.g. automata theory classes, compilers classes) stuff:
JFLAP is software for experimenting with formal languages topics including nondeterministic finite automata, nondeterministic pushdown automata, multi-tape Turing machines, several types of grammars, parsing, and L-systems. In addition to constructing and testing examples for [...]
If you’re application is crashing at runtime with Run-Time Error R6034 try changing the “Solutions Configuration” from “Debug” to “Release”. Worked for me.
Today FEUP received a visit from the President. The most I (and most people I spoke too) cared about was the implications it would have in finding a parking spot. I was told that part of the visit was streamed but apparently everyone I know got something along the lines of “not enough bandwidth” when [...]
This one is almost over… it’s been… interesting. Trying hard to keep up with the news. The only thing interesting I read was the AACS stuff. Who would’ve thought after so much work they wouldn’t even bother encrypting the USB traffic?
Another recent development that I’ve been keeping up to date with is NeACM’s FEUP Blogs. [...]







