I hereby claim:
- I am quangquach on github.
- I am quangquach (https://keybase.io/quangquach) on keybase.
- I have a public key whose fingerprint is B1A4 BED0 393A 3556 38D0 15EC 2A7C 169F 75D5 E5A2
To claim this, I am signing this object:
# 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' |
#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; |
(defn mark [xs idx] | |
"Iterate over the xs with each j step of (idx * idx + (j * idx)) | |
For each element of step, mark them false (a.k.a not a prime number)" | |
(loop [arr xs | |
j 0] | |
(let [step (+ (* idx idx ) (* j idx))] | |
(if (< step (count arr)) | |
(recur (assoc arr step false) (inc j)) | |
arr)))) |
I hereby claim:
To claim this, I am signing this object:
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 |
#!/usr/bin/env python | |
# require lame http://lame.sourceforge.net | |
import sys | |
import os | |
import re | |
import subprocess | |
path = sys.argv[1:][0] |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Vietjet Air Crawlee</title> | |
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js'></script> | |
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.1.1/css/bootstrap-combined.min.css" rel="stylesheet"> | |
</head> | |
<body> | |
<script> | |
window.onload = function() { |
#!/usr/bin/env ruby | |
require 'yaml' | |
DB_ADAPTER = "postgresql" | |
DATABASE = "my_database" | |
ENCODING = 'utf8' | |
TEMPLATE = 'template0' | |
TIMEOUT = 5000 | |
POOL = 5 |