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
Image* MainWindow::toImage(QImage* qimage) | |
{ | |
qDebug() << "toImage:" << qimage->width() << qimage->height(); | |
Image *newImage = new Image(Magick::Geometry(qimage->width(), qimage->height()), Magick::ColorRGB(0.5, 0.2, 0.3)); | |
double scale = 1 / 256.0; | |
newImage->modifyImage(); | |
Magick::PixelPacket *pixels; | |
Magick::ColorRGB mgc; |
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 | |
# based on http://stackoverflow.com/questions/7052947/split-95mb-json-array-into-smaller-chunks | |
# usage: python json-split filename.json | |
# produces multiple filename_0.json of 1.49 MB size | |
import json | |
import sys | |
with open(sys.argv[1],'r') as infile: | |
o = json.load(infile) |
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
/**************** | |
* drones101.js * | |
**************** | |
* | |
* Do you remember, my dear Professor, a certain introductory | |
* computational rationality class you taught long ago? Assignment | |
* #2, behavior functions of autonomous agents? I remember that one | |
* fondly - but attack drones are so much easier to reason about | |
* when they're not staring you in the face, I would imagine! |