Tired of developing on my gaming laptop virtualizing Ubuntu, I now decided it is time to use my old PC case and build meself a new computer. I went for a decent processor and video card but good RAM and SSD drive. This are my final specs:
CPU: Intel Core i5-4670K 3.4GHz Quad-Core Processor ($234.99 @ Newegg)
CPU Cooler: Arctic Cooling Freezer 7 Pro Rev.2 45.0 CFM Fluid Dynamic Bearing CPU Cooler ($17.99 @ Amazon)
Motherboard: Asus Z87-A ATX LGA1150 Motherboard ($119.98 @ SuperBiiz)
Memory: PNY XLR8 16GB (2 x 8GB) DDR3-1600 Memory ($134.00 @ Amazon)
Storage: Sandisk Ultra Plus 128GB 2.5" Solid State Drive ($65.98 @ Newegg)
Storage: Western Digital Caviar Blue 1TB 3.5" 7200RPM Internal Hard Drive ($54.99 @ Amazon)
Video Card: Gigabyte GeForce GTX 750 1GB Video Card ($99.99 @ Newegg)
Wireless Network Adapter: Intel 7260HMWDTX1 802.11a/b/g/n/ac PCI-Express x1 Wi-Fi Adapter ($45.99 @ SuperBiiz)
Total: $773.91
Generated by PCPartPicker 2014-10-25 22:46 EDT-0400
The first thing that gets your attention is the i5. Why not i7? The price difference for the i7 version of the processor is almost $100. What do you get with the i7 4770K? You get 2mb more of L3 cache memory and hyperthreading which bumps up your thread count to 8 even though you are still at quad core. IMO these advantages do not merit $100 so that is why I went with the i5.
Other important things here is the 2x8GB at 1600 for only $134. Since the motherboard has 4 slots, I will still have space to go to 32GB if necessary. 128GB of SSD should be enough for OS pagination (in case 16GB of RAM is not enough for the main bins). The video card is just on the threshold between budget and gaming video cards. It is enough in case you want to do some blender renderings or some steam gaming, but still not as expensive.
Note that it is still missing I/O accessories such as sound card, keyboard, monitor and mouse.
sábado, 25 de octubre de 2014
viernes, 24 de octubre de 2014
Last Project Euler for 75
Problem 99 (Python ... painfully slow but easy to code):
maxn = 0;
ind = 1;
with open("base_exp.txt") as f:
for line in f:
base = int(line.split(",")[0]);
exp = int(line.split(",")[1]);
res = base ** exp;
if(res > maxn):
maxn = res
print ind
ind += 1;
maxn = 0;
ind = 1;
with open("base_exp.txt") as f:
for line in f:
base = int(line.split(",")[0]);
exp = int(line.split(",")[1]);
res = base ** exp;
if(res > maxn):
maxn = res
print ind
ind += 1;
Etiquetas:
algorithms,
code,
codigo,
csv,
dijkstra,
lenguajes de programacion,
matrices,
pe92,
Perl,
programacion,
Programming,
programming languages,
Project Euler
Project Euler 99 en Octave
Esp: Uno facil. Escogi Octave porque queria probarlo. Siempre habia usado Matlab, pero Octave soporta operadores que Matlab no asi que Octave FTW.
Eng An easy one. I chose Octave just to try it out. I had always used Matlab, but since Octave has support for operators that Matlab doesn't I had to try it out. Octave FTW.
Eng An easy one. I chose Octave just to try it out. I had always used Matlab, but since Octave has support for operators that Matlab doesn't I had to try it out. Octave FTW.
a = 2;
for i=1:7830457
a *= 2;
a = mod(a , 10000000000);
end
printf("%.0f\n",mod(a* 28433 +1, 10000000000))
Project Euler 92 in Perl
Esp: Para no olvidar Perl decidi echarme el Project Euler 92 en Perl. Como en el problema solo puedes moverte hacia abajo o a la derecha, el codigo se vuelve mucho mas simple. De otra manera tendria que implementar Dijkstra en matrices en Perl (demasiado para una noche de ocio despues del trabajo...). Pero bueno aqui les dejo mi solucion:
Eng: Trying not to lose my working knowledge of Perl I decided to write this problem using it. The more general solution is where you can move up, down, left and right in which case you must use Dijkstra's algorithm using a matrix as the data structure. However for this particular problem you can only move down or right which makes it a lot easier. The algorithm just traverses the matrix in diagonal strips and adds its upper and left cell:
Eng: Trying not to lose my working knowledge of Perl I decided to write this problem using it. The more general solution is where you can move up, down, left and right in which case you must use Dijkstra's algorithm using a matrix as the data structure. However for this particular problem you can only move down or right which makes it a lot easier. The algorithm just traverses the matrix in diagonal strips and adds its upper and left cell:
use strict;
use warnings;
$| = 1; #turn autoflush on
use Text::CSV;
my @data; # 2D array for CSV data
my $file = 'matrix.txt';
my $csv = Text::CSV->new;
open my $fh, '<', $file or die "Could not open $file: $!";
while( my $row = $csv->getline( $fh ) ) {
print join(", ", @$row) ."\n";
#shift @$row; # throw away first value
push @data, $row;
}
my $w = scalar @{$data[0]};
for (my $slice = 0; $slice < 2 * $w - 1; ++$slice) {
my $z = $slice < $w ? 0 : $slice - $w + 1;
for (my $j = $z; $j <= $slice - $z; ++$j) {
my $x = $j;
my $y = $slice - $j;
my $val = $data[$x][$y];
if($x - 1 <= 0 && $y - 1 >= 0){
$val += ($data[$x-1][$y] > $data[$x][$y-1])?$data[$x][$y-1]:$data[$x-1][$y];
} else {
if($x - 1 >= 0){
$val += $data[$x-1][$y];
}
if($y - 1 >= 0){
$val += $data[$x][$y-1];
}
}
print "x: $x, y: $y, data: $data[$x][$y], val: $val\n";
$data[$x][$y] = $val;
}
}
for (my $i = 0; $i < $w; $i++){
for(my $j = 0; $j < $w; $j++){
print $data[$i][$j] ." ";
}
print "\n";
}
print "res: " . $data[$w-1][$w-1];
Etiquetas:
92,
algorithms,
code,
codigo,
csv,
dijkstra,
lenguajes de programacion,
matrices,
pe92,
Perl,
programacion,
Programming,
programming languages,
Project Euler
Suscribirse a:
Entradas (Atom)