Original articles by Mark Leair, PGI Compiler Engineer
This is Part 1 of a series of articles:
| # Usage: cas-get.sh {url} {username} {password} # If you have any errors try removing the redirects to get more information | |
| # The service to be called, and a url-encoded version (the url encoding isn't perfect, if you're encoding complex stuff you may wish to replace with a different method) | |
| DEST="$1" | |
| ENCODED_DEST=`echo "$DEST" | perl -p -e 's/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg' | sed 's/%2E/./g' | sed 's/%0A//g'` | |
| #IP Addresses or hostnames are fine here | |
| CAS_HOSTNAME=team.eea.sk | |
| #Authentication details. This script only supports username/password login, but curl can handle certificate login if required | |
| USERNAME=$2 |
| /* | |
| * Copyright (c) 2009-2017, Farooq Mela | |
| * All rights reserved. | |
| * | |
| * Redistribution and use in source and binary forms, with or without | |
| * modification, are permitted provided that the following conditions are met: | |
| * | |
| * 1. Redistributions of source code must retain the above copyright | |
| * notice, this list of conditions and the following disclaimer. | |
| * 2. Redistributions in binary form must reproduce the above copyright |
Original articles by Mark Leair, PGI Compiler Engineer
This is Part 1 of a series of articles:
Original article by Mark Leair, PGI Compiler Engineer
Note: This article was revised in March 2015 and again in January 2016 to bring it up-to-date with the production software release and to correct errors in the examples.
This is Part 2 of a series of articles:
| #include <roxlu/core/Log.h> | |
| #include <roxlu/core/Utils.h> | |
| #include <video/X264Encoder.h> | |
| X264Encoder::X264Encoder() | |
| :in_width(0) | |
| ,in_height(0) | |
| ,in_pixel_format(AV_PIX_FMT_NONE) | |
| ,out_width(0) | |
| ,out_height(0) |
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
| % Matlab code to produce PCA animations shown here: | |
| % http://stats.stackexchange.com/questions/2691 | |
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
| % Static image | |
| clear all | |
| rng(42) |
| // stackoverflow.com/a/13635318 | |
| // gist.github.com/ryanflorence/701407 | |
| var http = require("http"), | |
| url = require("url"), | |
| path = require("path"), | |
| fs = require("fs") | |
| port = process.argv[2] || 8888; | |
| http.createServer(function(request, response) { |
| #ifndef _CS_H | |
| #define _CS_H | |
| #include <stdlib.h> | |
| // #include <stdint.h> | |
| #include <limits.h> | |
| #include <math.h> | |
| #include <stdio.h> | |
| #include <stddef.h> | |
| #ifdef MATLAB_MEX_FILE | |
| #include "mex.h" |
| """ | |
| Parallelized k-means module. | |
| By David Warde-Farley, February 2012. Licensed under the 3-clause BSD. | |
| FROM gist.github.com/dwf/2200359 | |
| """ | |
| cimport cython | |
| from cython.parallel import prange | |
| import numpy as np | |
| cimport numpy as np |
| #!/bin/sh | |
| # Take a PDF, OCR it, and add OCR Text as background layer to original PDF to make it searchable. | |
| # Hacked together using tips from these websites: | |
| # http://www.jlaundry.com/2012/ocr-a-scanned-pdf-with-tesseract/ | |
| # http://askubuntu.com/questions/27097/how-to-print-a-regular-file-to-pdf-from-command-line | |
| # Dependencies: pdftk, tesseract, imagemagick, enscript, ps2pdf | |
| # Would be nice to use hocr2pdf instead so that the text lines up with the PDF image. | |
| # http://www.exactcode.com/site/open_source/exactimage/hocr2pdf/ |