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
\nonstopmode | |
\usepackage[letterpaper, margin=1in]{geometry} | |
\usepackage[utf8]{inputenc} | |
\usepackage{xcolor} | |
\usepackage{url} | |
\usepackage{hyperref} | |
\usepackage{keystroke} | |
\usepackage{tikz} | |
\usepackage{ifthen} |
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/env python3 | |
from json import load, dump | |
import sys | |
if len(sys.argv) != 3: | |
print("usage: %s INFILE OUTFILE", file=sys.stderr) | |
with open(sys.argv[1], "rt") as inf: |
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) |
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
#! /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
#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) \ |
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
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)) |
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 OCC.gp as gp | |
import OCC.BRepPrimAPI as brep | |
import OCC.BRepAlgoAPI as brep_alg | |
import OCC.Utils.DataExchange.IGES as iges | |
import OCC.Utils.DataExchange.STEP as step | |
import OCC.Display.SimpleGui as gui | |
objs = [] | |
for x in [0, 21]: | |
ax = gp.gp_Ax2(gp.gp_Pnt(x,0,0), gp.gp_Dir(0,1,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
Please get your timing code from | |
https://github.com/hpc12/lec1-demo |
OlderNewer