Skip to content

Instantly share code, notes, and snippets.

View marcusmueller's full-sized avatar

Marcus Müller marcusmueller

View GitHub Profile
module multiply (clk, a, b, result);
input clk;
input [7:0] a;
input [7:0] b;
output [15:0] result;
always @(posedge clk)
result = a * b;
endmodule // multiply
module divide(clk, a, b, result);
input clk;
input [7:0] a;
input [7:0] b;
output [7:0] result;
always @(posedge clk)
result = a / b;
endmodule // divide
#!/usr/bin/python2
# -*- encoding: utf-8 -*-
from matplotlib import pyplot
import seaborn
import numpy
from numpy import log10
from math import pi
from numpy import log as ln
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>GNU Radio&#39;s CDMA Package: amp_var_est.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<?xml version='1.0' encoding='utf-8'?>
<?grc format='1' created='3.7.11'?>
<flow_graph>
<timestamp>Fri May 12 16:01:07 2017</timestamp>
<block>
<key>options</key>
<param>
<key>author</key>
<value></value>
</param>
#!/bin/bash
tempf=$(mktemp --suffix=.pdf)
echo "Uncompressing original"
mutool clean -dif "$1" "$tempf"
echo "Removing all rectangles"
sed -i 's/^.* re$//' "$tempf"
echo "Compressing"
mutool clean -z "$tempf" "$2"
#!/usr/bin/env python3
from matplotlib import pyplot
import numpy
import typing
N_HASH = 701
def P_collision(n_entries: int, n_candidates: int) -> float:
return (1 - #calculating the no collisions prob
numpy.prod(
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-
# Author: Marcus Müller
# License: WTFPL.
from matplotlib import pyplot
import numpy
import typing
N_HASH = 701
WHY := why\ a\ 701\ hashtable\ is\ bad.png
OCC := distribution\ of\ hashes\ for\ English\ words.png
all: $(WHY) $(OCC)
.PHONY: all clean
$(WHY) $(OCC): histogram.csv
./birthday.py
histogram.csv: words.txt test_hashing