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 os | |
import fnmatch | |
import json | |
import argparse | |
def list_files_recursive(directory, include_patterns, exclude_dirs): | |
""" | |
List files recursively in the given directory, | |
filtering them by include patterns and excluding specified directories. |
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
#include "esp_camera.h" | |
#include <WiFi.h> | |
#include <ArduinoWebsockets.h> | |
// #include <algorithm> | |
// #include "soc/soc.h" //disable brownout problems | |
// #include "soc/rtc_cntl_reg.h" //disable brownout problems | |
#define CAMERA_MODEL_ESP32S3_EYE | |
#include "camera_pins.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
def csv2latex(file_path, sep): | |
with open(file_path, 'r') as file: | |
lines = file.readlines() | |
# count how many column there is | |
col = lines[0].count(sep) + 1 | |
empty_line = sep*int(col-1) | |
start = ['\\begin{table} \n','\caption{Table captions should be placed above the tables.}\label{tab1} \n'] | |
new = start | |
tabular = '\\begin{tabular}{'+'|l|'*col+'}\hline \n' | |
new.append(tabular) |
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 { fetchAPI } from "../utils/fetch-api"; | |
//import { NextRequest } from 'next/server'; | |
import { NextResponse } from 'next/server'; | |
export async function GET(request: Request) { | |
const query = { | |
filters: { | |
slug: {$eq:"home",}, | |
}, | |
populate: [ |
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 os | |
import xml.etree.ElementTree as ET | |
import json | |
import cv2 | |
from PIL import Image | |
def rose2COCO(coco_annotations, root_dir, name_ds, name_cls): | |
''' | |
root_dir = base directory of the dataset | |
name_ds = name of the dataset |
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
#!/usr/bin/env python | |
""" | |
### Find out the "bluriness" of each extracted image-frame to select the best image out of N frames, | |
### copy the resulting frames in a new dir mantaining exif info | |
### Arguments: image_directory best_of_n_frames method (1 or 2) | |
### python blurCV_detect.py /home/SfM/footage 30 1 | |
""" | |
import sys, glob, os, 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 os | |
import ipywidgets as widgets | |
class FileBrowser(object): | |
def __init__(self, init_path=None): | |
if init_path: | |
self.path = os.getcwd()+'/'+init_path | |
else: |
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
''' | |
texture image path are relative to the blend file directory. run from command line like this: | |
texture=img/2012720989_c.jpg blender -b mug.blend --python texture_change.py -F PNG -s 1 -e 1 -j 1 -t 0 -a | |
'''' | |
import os | |
image_file = os.getenv('texture') | |
if not image_file: | |
image_file="img/2012720989_c.jpg" |
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 | |
STARTPAGE=2 | |
ENDPAGE=75 | |
SOURCE=book.pdf | |
OUTPUT=book.txt | |
RESOLUTION=600 | |
LAYOUT="1" | |
[[ -e out.txt ]] && rm out.txt | |
for i in `seq $STARTPAGE $ENDPAGE`; do |
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
bl_info = { | |
"name": "Copy Particles to Rigid Bodies", | |
"version": (0, 0, 8), | |
"blender": (2, 6, 8), | |
"location": "View3D > Tool Shelf", | |
"description": "Transfers dupliobjects from a PS to a Rigid Bodies simulation", | |
"author": "Liero (on blenderartist), Eli Spizzichino", | |
"category": "Animation", | |
} |