Skip to content

Instantly share code, notes, and snippets.

View maxvonhippel's full-sized avatar
💭
Writing gnarly code!

Max von Hippel maxvonhippel

💭
Writing gnarly code!
View GitHub Profile
Query to 3.5:
> Let 0 < a < 1 and k = ceiling(a/(1-a)). How can I prove that a <= k/(k+1)?
Response:
---------------
To prove that a ≤ k/(k+1) given that 0 < a < 1 and k = ceiling(a/(1-a)), we can proceed as follows:
@maxvonhippel
maxvonhippel / ivy.sublime-syntax
Created December 22, 2021 05:19
Ivy Language Sublime Text Syntax Definition
%YAML 1.2
---
# See http://www.sublimetext.com/docs/syntax.html
file_extensions:
- ivy
scope: source.example-c
contexts:
main:
# Strings begin and end with quotes, and use backslashes as an escape
# character
@maxvonhippel
maxvonhippel / pvs.sublime-syntax
Created December 7, 2020 21:53
Practical Verification System (PVS) Sublime Text Syntax Highlighting
%YAML 1.2
---
# See http://www.sublimetext.com/docs/3/syntax.html
file_extensions:
- pvs
scope: source.pvs
contexts:
# The prototype context is prepended to all contexts but those setting
# meta_include_prototype: false.

This is a small collection of papers, presentations, and resources I have consumed and enjoyed or intend to read/reference/whatever down the line. Some items have unorganized sub-lists of related links and references below them, which provide additional context or information for further exploration.

CPS

import sys
import signal
import os
from ptyprocess import PtyProcessUnicode
# The purpose of this script is to serve as a wrapper around SPIN,
# providing functionality in interactive mode similar to stepping through
# an application, for instance in a MIPS emulator.
# See: http://spinroot.com/fluxbb/viewtopic.php?id=1662
@maxvonhippel
maxvonhippel / IntroPython.md
Last active April 30, 2020 21:47
A brief tutorial on having fun with Python.

This is intended to be a brief tutorial on having fun with Python.

Getting started.

Open the Terminal application on your Mac or Linux computer.
Open Sublime Text.
Type command n to create a new document. Type command s to save this document. When it asks for a path and file name, put it on your desktop, and save it as banana.py. Now, in your new file, write the following:

@maxvonhippel
maxvonhippel / makemamadroidfigure.py
Last active April 28, 2018 19:48
The purpose of this script is to make a `.png` figure of the Markov Chain output by MAMADROID for a malware sample
#!/usr/bin/python
# The purpose of this script is to turn a MAMADROID model into a cool visual figure
import matplotlib
matplotlib.use('Agg')
import networkx as nx
import ast
import matplotlib.pyplot as plt
from networkx.drawing.nx_agraph import graphviz_layout
# Begin the magic
G = nx.Graph()
@maxvonhippel
maxvonhippel / runmamadroid.sh
Created April 27, 2018 02:04
Getting started with MaMaDroid on Mac OS
# Clone MamaDroid
git clone https://bitbucket.org/gianluca_students/mamadroid_code.git mamadroid
# Get some malware to look at
git clone https://github.com/ashishb/android-malware.git malware
# Export variables
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/
export JRE_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/jre/bin
export PATH=$JAVA_HOME:$JRE_HOME:$PATH
# Base dir variable for convenience
basedir=$(echo $(pwd)/mamadroid)
# -*- coding: utf-8 -*-
import urllib
import json
from pprint import pprint
# get the web page
url = 'https://www.rally-maps.com/Rallye-Monte-Carlo-2017/Agnières-en-Dévoluy-Le-Motty#ElevationChart'
f = urllib.urlopen(url)
# find the relevant line
for line in f:
if 'elevationData:' in line:

Keybase proof

I hereby claim:

  • I am maxvonhippel on github.
  • I am maxvonhippel (https://keybase.io/maxvonhippel) on keybase.
  • I have a public key whose fingerprint is C838 65C8 0ED2 4086 139B A9FA F27D 6C17 D2DD F2CA

To claim this, I am signing this object: