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
# gem install bson | |
# gem install bson_ext | |
# gem install yajl-ruby | |
# gem install json | |
# gem install msgpack | |
# gem install oj | |
require 'rubygems' | |
require 'benchmark' | |
require 'yaml' |
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 <stdio.h> | |
#include <sys/stat.h> | |
#include <OpenCL/OpenCL.h> | |
#define ARRAY_SIZE 1024 | |
cl_context CreateContext() | |
{ | |
cl_int errNum = 0; | |
cl_uint numPlatforms = 0; |
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
This will format python datetime as a string to be used within jinja conditionals for comparing current date to article date using pelican app. | |
1. Create a file named jinjaext.py | |
2. paste the following snippet | |
def convertdate(datetime, format='%a-%d-%m-%Y'): | |
return datetime.date().strftime(format) | |
3. Add the following line to your config file |