Skip to content

Instantly share code, notes, and snippets.

@scottt
scottt / matplotlib-artist-object-api.ipynb
Last active November 25, 2015 05:48
Matplotlib Artist Object API
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@scottt
scottt / 3n1.c
Last active August 29, 2015 14:24
until-breakpoint: A GDB command that waits for a specific breakpoint to hit
volatile int n;
int main()
{
n = 29;
while (n != 1)
if (n % 2 == 1)
n = 3*n + 1;
else
n = n/2;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@scottt
scottt / uniform-discrete-random-variables.ipynb
Last active August 29, 2015 14:23
Uniformly Distributed Discrete Random Variables: Creating X[1,7] from X[1,5]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Failed to synchronize cache for repo 'rpmfusion-nonfree' from 'http://mirrors.rpmfusion.org/mirrorlist?repo=nonfree-fedora-22&arch=x86_64': Cannot prepare internal mirrorlist: No URLs in mirrorlist, disabling.
Last metadata expiration check performed 1:58:06 ago on Wed May 13 14:51:20 2015.
Dependencies resolved.
============================================================================================================================================
Package Arch Version Repository Size
============================================================================================================================================
Installing:
kernel x86_64 4.0.2-300.fc22 updates-testing 64 k
kernel-core x86_64 4.0.2-300.fc22 updates-testing
@scottt
scottt / hello-arm.S
Last active August 29, 2015 14:19
hello world in assembler under x86-64 and ARMv7-A Linux
.syntax unified
.thumb
#include <sys/syscall.h>
.section .text
.global _start
.thumb_func
_start:
/* write(1, "hello, world", 13) */
.syntax unified
.thumb
.data
out:
.space 10*4
semihost_arg:
.space 4*4
.text
PREFIX=$HOME/qemu-arm
export PATH=$PREFIX/bin:$PATH
export LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH
extraldflags="-Wl,--build-id";
buildldflags="VL_LDFLAGS=-Wl,--build-id"
./configure \
--prefix=$HOME/qemu-arm \
--disable-werror \
--disable-strip \
--enable-fdt \
--disable-xen \
--target-list=arm-softmmu
extraldflags="-Wl,--build-id";
buildldflags="VL_LDFLAGS=-Wl,--build-id"
./configure \
--prefix=$HOME/qemu-stm32 \
--disable-werror \
--disable-strip \
--enable-fdt \
--disable-xen \
--target-list=arm-softmmu \