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 bash | |
oc_ver="8.10" | |
echo "Autobuild OpenConnect $oc_ver" | |
echo " " | |
echo "This script uses apt-get and make install via sudo rights" | |
echo "To simplify this, we're going to use sudo -v to pre-authenticate you" | |
sudo -k | |
sudo -v |
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
""" | |
All the methods were generated based on the list of nodes from the | |
"Green Tree Snakes" guide: | |
https://greentreesnakes.readthedocs.io/en/latest/index.html | |
""" | |
import ast | |
class Visitor(ast.NodeVisitor): |
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 | |
# Purge existign CUDA first | |
sudo apt --purge remove "cublas*" "cuda*" | |
sudo apt --purge remove "nvidia*" | |
# Install CUDA Toolkit 10 | |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb | |
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub && sudo apt update | |
sudo dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb |
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
module type TERM = sig | |
type t | |
type tvar | |
val var_opt : t -> tvar option | |
val compare_var : tvar -> tvar -> int | |
val same_functor : t -> t -> bool | |
val args : t -> t list | |
end | |
module Make (Term : TERM) = struct |
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
# Install QEMU OSX port with ARM support | |
sudo port install qemu +target_arm | |
export QEMU=$(which qemu-system-arm) | |
# Dowload kernel and export location | |
curl -OL \ | |
https://github.com/dhruvvyas90/qemu-rpi-kernel/blob/master/kernel-qemu-4.1.7-jessie | |
export RPI_KERNEL=./kernel-qemu-4.1.7-jessie | |
# Download filesystem and export location |
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
/****************************************************************************/ | |
/* AM335x_PRU.cmd */ | |
/* Copyright (c) 2015 Texas Instruments Incorporated */ | |
/* */ | |
/* Description: This file is a linker command file that can be used for */ | |
/* linking PRU programs built with the C compiler and */ | |
/* the resulting .out file on an AM335x device. */ | |
/****************************************************************************/ | |
-cr /* Link using C conventions */ |
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 <assert.h> | |
#include <stddef.h> | |
#include <stdio.h> | |
#define var __auto_type | |
#define let __auto_type const | |
static inline void * variant_cast(void * variant_ptr, ptrdiff_t desired_tag) { | |
ptrdiff_t * variant_tag = (ptrdiff_t *)variant_ptr; | |
assert(*variant_tag == desired_tag); |
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
########################################################################## | |
# | |
# xmldiff | |
# | |
# Simple utility script to enable a diff of two XML files in a way | |
# that ignores the order or attributes and elements. | |
# | |
# Dale Lane (email@dalelane.co.uk) | |
# 6 Oct 2014 | |
# |
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
-- The meta-circular interpreter from section 5 of Reynolds's Definitional | |
-- Interpreters for Higher Order Programming Languages | |
-- (http://www.cs.uml.edu/~giam/91.531/Textbooks/definterp.pdf) | |
data EXP | |
= CONST Const | |
| VAR Var | |
| APPL Appl | |
| LAMBDA Lambda | |
| COND Cond |
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
(* Good morning everyone, I'm currently learning ocaml for one of my CS class and needed to implement | |
an avl tree using ocaml. I thought that it would be interesting to go a step further and try | |
to verify the balance property of the avl tree using the type system. Here's the resulting code | |
annotated for people new to the ideas of type level programming :) | |
*) | |
(* the property we are going to try to verify is that at each node of our tree, the height difference between | |
the left and the right sub-trees is at most of 1. *) |
NewerOlder