Skip to content

Instantly share code, notes, and snippets.

View onesuper's full-sized avatar

Dreamsome onesuper

View GitHub Profile
@onesuper
onesuper / gist:8129184
Last active January 1, 2016 10:09
liugu bfs
__global__ void
New_BFSKernel_multiBlock_2LQ_inGPU(int * workset,int * new_workset, Node* g_graph_node, Edge * g_graph_edge, int * visited, int * cost, int worksetsize, int * newsize,int level,int *flag,int *special_q)
{
int tid = blockIdx.x*blockDim.x + threadIdx.x;
count=0;
global_level = level;
global_worksize = worksetsize;
global_flag = 0;
odd = 0;
global_newsize = 0;
import sys
def sub(instr):
i = 0
gput = put()
gput.next()
while True:
c = instr[i]
struct foo {
int x;
int y;
};
static struct foo f;
/* The two following functions are running concurrently: */
int sum_a(void)
@onesuper
onesuper / LatexReborn
Created October 30, 2012 05:05
let dead latex pictures reborn
javascript:(function(){var from="http://latexservice.mpstechnologies.com/latexservice.cgi";var to="http://latex.codecogs.com/gif.latex";var array=document.getElementsByTagName("img");for(var i=0; i<array.length;i++){if(array[i].src.indexOf(from)==0) {array[i].src=array[i].src.replace(from, to);}}})()
@onesuper
onesuper / wordpressxml2jekyll.rb
Created March 24, 2012 01:34 — forked from markoa/wordpressxml2jekyll.rb
Script to export posts from a Wordpress XML file to Jekyll (Textile) files. Collects comments in a YAML file too.
#!/usr/bin/env ruby
# Input: WordPress XML export file.
# Outputs: a series of Textile files ready to be included in a Jekyll site,
# and comments.yml which contains all approved comments with metadata which
# can be used for a Disqus import.
require 'rubygems'
require 'hpricot'
require 'clothred'