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 enum import Enum | |
from random import random | |
Ops = Enum("Ops", ["Add", "Sub", "Mult", "Pow"]) | |
# 3 expression types for a simple AST | |
class Constant: | |
def __init__(self, value): | |
self.value = value |
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 enum import Enum | |
from random import random | |
Ops = Enum("Ops", ["Add", "Sub", "Mult", "Pow"]) | |
# 3 expression types for a simple AST | |
class Constant: | |
def __init__(self, value): | |
self.value = value |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>WebGPU Image Convolution</title> | |
</head> | |
<body> | |
<h1>WebGPU Image Convolution</h1> | |
<button id="run">Run Convolution</button> |
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 cv2 | |
import hnswlib | |
import numpy as np | |
def set_resolution(cap, width, height): | |
cap.set(cv2.CAP_PROP_FRAME_WIDTH, width) | |
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, height) | |
def extract_face_pose(frame, face_detector): | |
faces = face_detector.detectMultiScale(frame, scaleFactor=1.1, minNeighbors=5) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
apt update && apt install \ | |
tmux \ | |
htop \ | |
git \ | |
ffmpeg \ | |
zip \ | |
python3-pip |
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
// original function, generates single trajectory | |
RawImage KBMOSearch::stackedStamps(trajectory t, int radius, std::vector<RawImage*> imgs) | |
{ | |
if (radius<0) throw std::runtime_error("stamp radius must be at least 0"); | |
int dim = radius*2+1; | |
RawImage stamp(dim, dim); | |
std::vector<float> times = stack.getTimes(); | |
for (int i=0; i<imgs.size(); ++i) | |
{ | |
for (int x=0; x<dim; ++x) |
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
#!/bin/sh | |
# Add this to /bin/ folder and never look up how to extract a tar again | |
# Usage: untar some-software-1.0-linux-x86_64.tar.gz | |
tar -zxvf $1 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.