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
import numpy as np | |
import pyopencl as cl | |
from time import time | |
def bandwidth_calculator(n_numbers): | |
a = np.random.rand(n_numbers).astype(np.float32) | |
mf = cl.mem_flags | |
a_dev = cl.Buffer(ctx, mf.READ_ONLY | mf.COPY_HOST_PTR, hostbuf=a) |
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
MIME-Version: 1.0 | |
Content-Transfer-Encoding: 8bit | |
Content-Type: text/plain; charset="utf-8" | |
From: Andreas Kloeckner <[email protected]> | |
To: Debian Bug Tracking System <[email protected]> | |
Subject: xserver-xorg-video-intel: none | |
Package: xserver-xorg-video-intel | |
Version: 2:2.99.917+git20161105-1 | |
Severity: wishlist |
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
#! /bin/bash | |
if [[ -z "$TMUX" ]]; then | |
echo "This wants to be run inside of tmux" | |
exit 1 | |
fi | |
tmux set-option set-remain-on-exit on | |
for machine in porter stout quail pheas; do | |
tmux neww -n $machine ssh -t root@$machine "$@" |
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
def map_comparison(self, expr, *args, **kwargs): | |
return type(expr)( | |
self.rec(expr.left, *args, **kwargs), | |
expr.operator, | |
self.rec(expr.right, *args, **kwargs)) | |
def map_logical_not(self, expr, *args, **kwargs): | |
return type(expr)( | |
self.rec(expr.child, *args, **kwargs)) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 <cuda.h> | |
#include <stdio.h> | |
#include <stdexcept> | |
#include <iostream> | |
#define CUDAPP_CALL_GUARDED(NAME, ARGLIST) \ | |
{ \ | |
CUresult cu_status_code; \ | |
cu_status_code = NAME ARGLIST; \ | |
if (cu_status_code != CUDA_SUCCESS) \ |
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
#! /bin/zsh | |
setopt -o EXTENDED_GLOB | |
cp -R /usr/share/texlive/texmf-dist/tex/latex/tcolorbox . | |
tar cvfz loopy-submission.tar.gz --transform='s,.*/,,' \ | |
loopy.{tex,bib} out/loopy.bbl media/*.pdf *.cls \ | |
tcolorbox/* | |
rm -Rf tcolorbox |
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
import numpy | |
import pycuda.autoinit | |
import pycuda.driver as drv | |
from pycuda.compiler import SourceModule | |
from pycuda.gpuarray import to_gpu | |
mod = SourceModule(""" | |
typedef struct _pair | |
{ |
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
def fake_newton(f): | |
print f(17) | |
def main(): | |
target_value = 18 | |
def f(x): | |
return x - target_value | |
fake_newton(f) |