Copy this file into the root of a software repository.
Then tell your coding agent:
Read AGENT_BOOTSTRAP.md and bootstrap this repo.
There is currently no simple, affordable, and reliable system that allows continuous, long-term indoor video recording (6–12 months) with the following properties:
| # SPDX-License-Identifier: MIT | |
| # | |
| # Copyright (c) 2025 Cyrille Rossant | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is | |
| # furnished to do so, subject to the following conditions: |
| import requests | |
| import pandas as pd | |
| def get_author_id(author_name): | |
| """Retrieve OpenAlex author ID using the author's name.""" | |
| search_url = f"https://api.openalex.org/authors?search={author_name}" | |
| response = requests.get(search_url) | |
| response.raise_for_status() | |
| data = response.json() | |
| if data['results']: |
| // Requires gcc, the Vulkan SDK, and libglfw3-dev | |
| // On Linux, compile with: | |
| // gcc -Wall -o fail fail.c -Ibuild/_deps/glfw-src/include/ -lglfw -lvulkan | |
| #include <assert.h> | |
| #include <stdbool.h> | |
| #include <string.h> | |
| #include <vulkan/vulkan.h> | |
| #include <GLFW/glfw3.h> |
| def lru_cache(maxsize=0): | |
| """Custom LRU cache implementation that gives access to the underlying cache dictionary. [better to used functools one if you don't need this]""" | |
| def wrap(f): | |
| cache = {} | |
| last_used = [] | |
| def wrapped(*args): | |
| if args in cache: | |
| # HIT. | |
| # Update the last_used list. |
| from onelib import one | |
| """ | |
| Different ONE backends are available, HTTP, figshare, etc. | |
| One has to implement the following functions to create a new ONE backend: | |
| * list_all_files(): return a list of relative file paths for ALL available files. | |
| * search(...): return a list of dset_ids (by default, a dset_id is a relative file path). | |
| The default implementation calls list_all_files(), and performs the search directly on that list. |
| """Write a NumPy array in parallel from multiple CPUs/processes, using shared memory.""" | |
| from contextlib import closing | |
| import multiprocessing as mp | |
| import os | |
| import numpy as np | |
| def _init(shared_arr_): |
| import os | |
| import requests | |
| import shutil | |
| def _dl(url, path): | |
| print("download", url, "to", path) | |
| response = requests.get(url, stream=True) | |
| if response.status_code != 200: | |
| return |
| #!/usr/bin/env python3 | |
| """ | |
| Code from http://www.labri.fr/perso/nrougier/python-opengl/#the-hard-way | |
| """ | |
| import ctypes | |
| import logging |