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
socat /dev/ttyUSB2,rawer system:'tee in.log | socat stdio "pty,rawer,link=/tmp/relay" | tee out.log' | |
# this doesn't seem to work with all applications, but it's a start. Redirect your application to talk to /tmp/relay instead of /dev/ttyUSB2, in this example. | |
# IOCTLs are not transferred, so you may need to set the port speed manually with stty -F <port> <speed> <settings> |
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
diff --git a/libwdi/libwdi.c b/libwdi/libwdi.c | |
index 0bd1296..2c2b072 100644 | |
--- a/libwdi/libwdi.c | |
+++ b/libwdi/libwdi.c | |
@@ -25,6 +25,7 @@ | |
#include <crtdbg.h> | |
#endif | |
+#include <initguid.h> | |
#include <windows.h> |
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 __future__ import annotations | |
from subprocess import Popen, PIPE | |
import sys | |
def select_i(choices: List[str], multi:bool=False) -> (List[int], List[str]): | |
""" | |
Interactively select from a list of choices, returning the selections | |
and their indices in the original list of choices. | |
""" | |
stdin_data = '\n'.join(choices).encode('utf-8') |
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 gradients are gone bro, they left | |
"initialization game" | |
"probable uncertainty" |
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
import numpy as np | |
import matplotlib.pyplot as plt | |
import serial | |
plt.ion() | |
fig = plt.figure() | |
ax1 = fig.add_subplot(3, 1, 1) | |
ax2 = fig.add_subplot(3, 1, 2) | |
ax3 = fig.add_subplot(3, 1, 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
// Hardfault handler and setup functions for error reporting. | |
#include <MK64F12.h> | |
#define __GPIO_CLEAR(thing) thing->PCOR | |
#define __GPIO_SET(thing) thing->PSOR | |
#define SET_LED(base, which) do { __GPIO_CLEAR(GPIO##base) |= (1 << which); } while(0) | |
#define CLEAR_LED(base, which) do { __GPIO_SET(GPIO##base) |= (1 << which); } while(0) | |
#if CLOCK_SETUP == 1 | |
#undef DEFAULT_SYSTEM_CLOCK | |
#define DEFAULT_SYSTEM_CLOCK (SystemCoreClock >> 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
# setup variables | |
src := src | |
out := build | |
test := test | |
ip := lab_uart.srcs/sources_1/ip | |
std := 93 | |
search_dirs := ../unisim_ghdl/xilinx-vivado/unisim/v93 ../unisim_ghdl/xilinx-vivado/secureip/v93 | |
# source lists | |
main_sources := math uart_rx uart_tx axi_tx axi_rx baudgen uart |
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
import numpy as np | |
def print_palette(M, m, v): | |
pass | |
def scale(r1, r2, v): | |
left = r1[1] - r1[0] | |
right = r2[1] - r2[0] | |
scaled = float(v - r1[0]) / float(left) |
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
#pragma once | |
struct video_handshake { | |
int rows, cols, cvtype, cvstep; | |
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder