Skip to content

Instantly share code, notes, and snippets.

View czl0706's full-sized avatar

Cheng-Zong Li czl0706

  • National Yang Ming Chiao Tung University
  • 09:19 (UTC +08:00)
View GitHub Profile
#include <iostream>
#include <vector>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <omp.h>
using namespace std;
int main() {
module ISP(
// Input Signals
input clk,
input rst_n,
input in_valid,
input [3:0] in_pic_no,
input in_mode,
input [1:0] in_ratio_mode,
// Output Signals
module Conv(
// Input signals
clk,
rst_n,
filter_valid,
image_valid,
filter_size,
image_size,
pad_mode,
act_mode,
import os
import subprocess
import logging
import argparse
# Set up logging
logging.basicConfig(level=logging.INFO, format='[%(levelname)s] %(message)s')
logger = logging.getLogger()
VIDEO_EXTENSIONS = ['.mp4']
$path = "${env:appdata}\Code\User\workspaceStorage"
$directories = Get-ChildItem -Path $path -Directory
function Remove-Workspace {
param (
[string]$dirPath,
[string]$folderPath
)

Quick cheat sheet of helpful tmux commands

  1. tmux new - Create and attach to a new session.
  2. tmux new -s NAME_HERE - Create and attach to a new session named NAME_HERE.
  3. CTRL-b, d - Detach (i.e. exit) from the currently-opened tmux session (alternatively, tmux detach). Note, this means press and hold CTRL, press b, release both, press d.
  4. tmux ls - Show list of tmux sessions.
  5. tmux a - Attach to the previously-opened tmux session.
  6. tmux a -t NAME_HERE - Attach to the tmux session named NAME_HERE.
  7. CTRL-d - Delete (i.e. kill) currently-opened tmux session (alternatively tmux kill-session).
  8. CTRL-b, [ - Enter copy mode, and enable scrolling in currently-opened tmux session. Press q to exit.
  9. CTRL-b, " - Split window horizontally (i.e. split and add a pane below).
import socket
import json
# connect to 192.169.4.16:80
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.bind(('192.168.4.2', 9000))
while True:
data, addr = s.recvfrom(1024)
data = json.loads(data.decode())
from m5stack import *
from m5ui import *
from uiflow import *
import time
import i2c_bus
import struct
import network
import socket
import json