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/bash | |
FLAG_FILE="/tmp/startup_script_executed" | |
if [ ! -f "$FLAG_FILE" ]; then | |
# Your commands here | |
echo "Running startup commands..." | |
# Example: Start a new tmux session with specific windows | |
tmux new-session -d -s my_session |
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 bpy | |
import threading | |
import uvicorn | |
from fastapi import FastAPI | |
# Define the FastAPI application | |
app = FastAPI() | |
@app.get("/") | |
def read_root(): |
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
function getAllIndexes(string, texts) { | |
const results = []; | |
texts.forEach(text => { | |
const regex = new RegExp(text, 'gi'); | |
let match; | |
while ((match = regex.exec(string)) !== null) { | |
const startIndex = match.index; | |
const endIndex = match.index + text.length - 1; |
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 | |
from pycocotools.coco import COCO | |
from tqdm import tqdm | |
import numpy as np | |
import os | |
import os.path as osp | |
import shapely | |
from copy import deepcopy | |
import json | |
import shutil |
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 cv2 | |
import random | |
import math | |
from shapely import LineString | |
width, height = None, None | |
def line_segments_intersection(l1, l2): |
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 cairo | |
import numpy as np | |
import math | |
def cb(x1, y1, x4, y4, xc, yc): | |
ax = x1 - xc | |
ay = y1 - yc | |
bx = x4 - xc | |
by = y4 - yc |
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 bpy | |
from os.path import join | |
from bpy import context | |
import mathutils | |
import math | |
import builtins as __builtin__ | |
import copy | |
def console_print(*args, **kwargs): |
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 open3d as o3d | |
import numpy as np | |
from tqdm import trange | |
from os.path import join | |
FOLDER = r"E:\workspace\dataset\24_7scene\chess" | |
def main(): | |
volume = o3d.pipelines.integration.ScalableTSDFVolume( |
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 json, os, shutil | |
from os.path import join, basename | |
from tqdm import tqdm | |
import numpy as np | |
MESHROOM = r"E:\workspace\dataset\01_DTU\cache\20\meshroom\MeshroomCache\ConvertSfMFormat\4b9ced4a64f3f996f7650f3d5ed9e27c4774a7c9\sfm.json" | |
COLMAP = r"E:\workspace\dataset\01_DTU\cache\20\colmap" | |
def make_dir(folder): |
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
{ | |
"configurations": [ | |
{ | |
"name": "Linux", | |
"includePath": [ | |
"${workspaceFolder}/**", | |
"/usr/include/**" | |
], | |
"defines": [], | |
"compilerPath": "/usr/bin/gcc", |
NewerOlder