1. Suponga que el siguiente grafo representa a la web en una escala realmente diminuta.
. (2) <---> (1) ----> (3) <---> (4)
En esta estructura deberia haber un Componente fuertemente conexo (SCC). Otros como parte del componente "IN", "OUT", etc. Hay varias interpretaciones posibles para este grafo, construya todas las intepretaciones posibles y luego identifique la opcion correcta entre las siguientes.
a) 1 esta en el SCC y 2 en IN
b) 3 y 4 estan en el SCC
c) 3 esta en el SCC y 4 es un tentaculo
d) 2 esta en IN y 4 en OUT
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
/* | |
* Ejercicio [5] final 12/12/06 | |
* Escribir un algoritmo ANSI C que, sin crear archivos intermedios | |
* altere el archivo a.txt reemplazando la secuencia '//' por '*' | |
* Excepto si se encuentra entre parentesis | |
*/ | |
/* | |
* Compilar con gcc -ansi -std=gnu99 -o prueba inplace-acortar.c | |
*/ |
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
/* | |
Implemente una rutina (en Windows o Linux) que dibuje un óvalo que ocupe toda la ventana. | |
*/ | |
#include <gtkmm/drawingarea.h> | |
#include <gtkmm/application.h> | |
#include <gtkmm/window.h> | |
#include <cmath> | |
class Ovalo : public Gtk::DrawingArea { |
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 "DirectoryException.h" | |
DirectoryException::DirectoryException(const std::string& what_arg) | |
: std::logic_error(what_arg) { | |
} |
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 python3 | |
""" | |
1. Calcular el PageRank tematico para el siguiente grafo. | |
. (2) <---> (1) ----> (3) <---> (4) | |
Asumir que los nodos que representan el tema de interes son el 1 y el 2 y que el peso del nodo 1 es el doble del tema 2. Usar b=0.7. Y luego identificar la opcion correcta entre las siguientes: | |
a) TSPR(1) = .2455 | |
b) TSPR(4) = .6680 | |
c) TSPR(1) = .3576 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
tinchou@martin-w81 MINGW64 ~ | |
$ docker-machine -D env --shell cmd default | |
executing: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe showvminfo default --machinereadable | |
STDOUT: name="default" | |
groups="/" | |
ostype="Linux 2.6 / 3.x / 4.x (64-bit)" | |
UUID="212c7825-85fe-4faf-a454-9af114c61af1" | |
CfgFile="<user path>\\.docker\\machine\\machines\\default\\default\\default.vbox" | |
SnapFldr="<user path>\\.docker\\machine\\machines\\default\\default\\Snapshots" | |
LogFldr="<user path>\\.docker\\machine\\machines\\default\\default\\Logs" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
class LZW: | |
def __init__(self): | |
self.ctx = "" | |
self.table = [ chr(i) for i in range(256) ] | |
self.empty_index = 256 | |
self.last_index = None | |
self._model = [] | |
def encode(self, c): | |
"""Receives a character to encode. Updates the table.""" |
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
class AdaptiveArithmeticCoder: | |
FREQ_INIT = 1 | |
def __init__(self, character_space): | |
self.character_space = character_space | |
self.count = len(character_space) | |
self.freqs = [ AdaptiveArithmeticCoder.FREQ_INIT ] * self.count | |
self.intervals = [ None ] * self.count | |
self.update_intervals((0, 1)) | |
def update_intervals(self, interval): |