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
'use strict'; | |
$(document).ready(function() { | |
var openedReplyUrl = null; | |
var openedReplyComment = null; | |
$('.comment').each(function (index, commentElement) { | |
$(commentElement).find('.reply').click(function (e) { | |
var replyUrl = $(commentElement).attr('reply-url'); | |
if(openedReplyUrl == replyUrl) { | |
return; |
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/python3 | |
#import png | |
import itertools | |
import time | |
import numpy as np | |
import math | |
import random | |
import os |
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
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
module Main where { | |
import Data.Maybe (catMaybes); | |
import Data.Function (on); | |
import Data.List (group,intersperse,sort,sortBy,groupBy); | |
import qualified Control.Monad.State as S; | |
--import Control.Monad.Writer; | |
import Text.ParserCombinators.ReadP; |
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/python3 | |
#import png | |
import itertools | |
import time | |
import numpy as np | |
import math | |
import random | |
import os |
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 <stdlib.h> | |
#include <stdio.h> | |
typedef int bool; | |
#define true 1 | |
#define false 0 | |
#define SWAP(a,b) { (a) ^= (b); (b) ^= (a); (a) ^= (b); } |
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/python3 | |
import sys | |
import itertools | |
import time | |
N = 9 | |
S = 3 | |
def process(f): |
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
/* bitset.h */ | |
template <typename T> | |
inline constexpr T ceildiv(const T a, const T b) { | |
return (a + b - 1) / b; | |
} | |
/* Rotate the bits of x to the right by I bits. */ | |
template <typename T> | |
inline T rotate_right(const T & x, const int & I) |
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
#version 430 | |
struct atlas_entry { | |
ivec2 pos; | |
ivec2 size; | |
}; | |
uniform Atlas { | |
atlas_entry entries[1024]; | |
} uAtlas; |
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
// Gaussian filter of image | |
__kernel void gaussian_filter(__read_only image2d_t srcImg, | |
__write_only image2d_t dstImg, | |
sampler_t sampler, | |
int width, int height) | |
{ | |
// Gaussian Kernel is: | |
// 1 2 1 |
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
exc@lambda ~/src/examples/opencl/prefix_sum $ optirun python3 prefix_sum.py | |
[ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | |
25 26 27 28 29 30 31] | |
(16,) None | |
<pyopencl.cffi_cl.CommandQueue object at 0x7f378fefcac8> (16,) None <pyopencl.cffi_cl.Buffer object at 0x7f3787cce470> <pyopencl.cffi_cl.Buffer object at 0x7f3787cd8d68> 0 1 | |
Adding ap[54668944] and ap[109337888] (start, stride: 54668944, 54668944), (size: 16,0) | |
Adding ap[164006832] and ap[218675776] (start, stride: 54668944, 54668944), (size: 16,0) | |
Adding ap[273344720] and ap[328013664] (start, stride: 54668944, 54668944), (size: 16,0) | |
Adding ap[382682608] and ap[437351552] (start, stride: 54668944, 54668944), (size: 16,0) | |
Adding ap[492020496] and ap[546689440] (start, stride: 54668944, 54668944), (size: 16,0) |
OlderNewer