Skip to content

Instantly share code, notes, and snippets.

View neka-nat's full-sized avatar
🐻‍❄️
rebooting...

k-tanaka neka-nat

🐻‍❄️
rebooting...
View GitHub Profile
@sheep-snow
sheep-snow / Dockerfile
Last active March 6, 2025 05:43
using-uv-with-python-lambda-image-on-ecr-public-repo
# AWS Lambda 関数の公式コンテナイメージ https://gallery.ecr.aws/lambda/python で
# uv https://docs.astral.sh/uv/ を使って python パッケージ管理と実行を可能にする最小限の例
FROM public.ecr.aws/lambda/python:3.12
# uv を公式イメージからCOPYする方法でインストールする
# https://docs.astral.sh/uv/guides/integration/docker/#installing-uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
ENV PATH="/app/.venv/bin:$PATH"
# AWS Lambda は書込可能なディレクトリが `/tmp` 配下だけなので uv の cache も同ディレクトリ配下を使うように変更する
@Susensio
Susensio / numpy_lru_cache.md
Last active November 26, 2024 21:25
Make function of numpy array cacheable

How to cache slow functions with numpy.array as function parameter on Python

TL;DR

from numpy_lru_cache_decorator import np_cache

@np_cache()
def function(array):
 ...
@simeji
simeji / get_repo_stars.sh
Last active February 11, 2025 19:31
Get count of Github repository stars
#!/bin/bash
USER=$1
REPO=$2
if [ -z "$USER" -o -z "$REPO" ]; then
echo '$1 : Github username, $2: Github repository name (only public repo)'
exit 1
fi
FILENAME=star_${USER}_${REPO}
@ClintLiddick
ClintLiddick / rust-robotics-libraries.md
Last active July 26, 2024 13:41
Rust Libraries for Robotics

Motivation

tl;dr I want to use Rust to program robots. Help me find the best core libraries to build on.

Robotic systems require high performance and reliability, but also have enormous complexity in terms of algorithms employed, number of subsystems, embedded hardware control, and other metrics. Development is mostly split between C++ for performance and safety critical components, and MatLab or Python for quick research or task iteration.

@dangets
dangets / thrust_opengl_interop.cu
Created June 13, 2012 20:46
Working cuda thrust opengl interop - original from NVIDIA SDK, then modified from deprecated ogl allocator thrust example
#include <math.h>
#include <GL/glew.h>
#include <GL/freeglut.h>
#include <cuda_gl_interop.h>
#include <thrust/device_vector.h>
#include <thrust/transform.h>
#include <thrust/iterator/counting_iterator.h>