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
// https://stackoverflow.com/questions/25585066/removing-slow-int64-division-from-fixed-point-atan2-approximation | |
uint8_t ffo_lut(const int i) { | |
if(i <= 1) { | |
return i; | |
} | |
if( i <= 3) { | |
return 2; | |
} | |
if( i < 8) { | |
return 3; |
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
FROM ubuntu:focal-20220531 | |
MAINTAINER ben | |
ENV DEBIAN_FRONTEND noninteractive | |
ENV DISPLAY :0 | |
ENV LC_ALL=C | |
RUN apt-get update && \ | |
apt-get install -y \ |
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
FROM ubuntu:focal-20210827 | |
MAINTAINER esromneb | |
ENV DEBIAN_FRONTEND noninteractive | |
ENV DISPLAY :0 | |
ENV LC_ALL=C | |
RUN apt-get update && \ | |
apt-get install -y \ |
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
lattice/makefile under linux | |
verilator project and folder structure | |
kernel / send signals to specific threads + export issue | |
signal to userspace with fifo | |
simple vma kernel module | |
git for companies under 10 people | |
how to work on powerpoint with an older person (josef) | |
circleci for vivado | |
jenkins for lattice |
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
//Recursive ray tracer | |
void RayEngine::trace( | |
const Ray& r, | |
const int depthIn, | |
const double effect, | |
Vec3 &color, | |
const bool click, | |
bool &bSphere, // fixme should be const, needs to be copied below | |
Vec3 &objectNum, |
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
START_LOC = 0x0000; | |
IMEM_LEN = 0x6400; | |
DMEM_LEN = 0x1800; | |
BOOT_LEN = 0x03f8; | |
PASS_FAIL_LEN = 0x0008; | |
MEMORY { | |
imem (R) : ORIGIN = START_LOC , LENGTH = IMEM_LEN | |
dmem (RW) : ORIGIN = IMEM_LEN , LENGTH = DMEM_LEN | |
bootloader (RW): ORIGIN = IMEM_LEN + DMEM_LEN , LENGTH = BOOT_LEN |
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
dashtie | |
shannon fifo | |
libevent pipe (under node) | |
napi helper | |
static hash | |
typed arrays in javascript( see https://www.npmjs.com/package/operator-overloading https://github.com/charlieroberts/jsdsp ) |
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
if 1: | |
x1 = -659 | |
y1 = -10000.0 | |
x2 = 45 | |
y2 = -40000.0 | |
m = (y2-y1)/(x2-x1) | |
print "slope ", m | |
b = y2-(m*x2) |
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
haiku1 = ['A', 'fat', 'bee', 'stings', 'me', 'It', 'hurts', 'very', 'badly', 'but', 'I', 'do', 'not', 'cry', 'though'] | |
list1 = [9, 11, 6, 14, 1, 10, 12, 0, 3, 4, 8, 5, 7, 13, 2] | |
haiku2 = [(8, 'feathers'), (2, 'evening'), (5, 'together'), (1, 'peaceful'), (6, 'with'), (0, 'A'), (4, 'singing'), (7, 'pretty'), (3, 'Sparrows')] | |
haiku3 = 'High and smooth it flew. Into the sky, soaring straight. Flying planes with you.' | |
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
# This class wraps socket, and will maybe send your packet | |
# tune tx_drop_rate and rx_drop_rate, 0 means transmit everything, 1 means drop everything | |
# This class works best for UDP, as it doesn't allow you to drop TCP control messages | |
import socket | |
import random | |
class LossySocket(object): | |
def __init__(self, *p): | |
self._sock = socket.socket(*p) |
NewerOlder